question

Chethan V avatar image
Chethan V asked

How to send username in account recovery email

So In my game the sign up process is by username+email+password. To login username+password is used.For forget password email field is required.

But here in the email of the forget password I want the username to be sent to the user along with the link to reset password. Currently only the link to reset passsword is being sent.

As I have seen in the documentation along with the email,TitleID ,which I have set , the other two fields i.e.,CustomTags,EmailTemplateId doesn't in anyway help the purpose.Is there a way to send the username along with the reset password link?

The reason I want the username is people usually tend to forget their username quite often

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Made Wang avatar image
Made Wang answered

Username cannot be added dynamically in email template, and SendCustomAccountRecoveryEmail cannot modify the content of the email template. But you can get the Token from the redirect URL, then call GetPlayerIdFromAuthToken to get the PlayFabId, and then call GetUserAccountInfo to get the Username. So you can get the Username in your redirect website.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JayZuo avatar image JayZuo ♦ commented ·

In email template, you can get the player's display name with "$Profile.DisplayName$". So, using display name instead of username might be a simpler solution. For more details about how to personalize the email template by using variables for player, event, or email data, please click "What's this?" button in Email Template.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.