question

oumaymamezni avatar image
oumaymamezni asked

Including Token in Recovery Password Email Body

Hi,

I am currently in the process of implementing the recovery password process for our game. In Step 5 of the process outlined in the documentation [link: https://learn.microsoft.com/en-us/gaming/playfab/features/engagement/emails/using-a-rule-to-verify-a-contact-email-address],

I have a specific requirement where I need to include this token directly in the body of the email. Check image
I have reviewed the documentation thoroughly, but I couldn't find a straightforward way to achieve this. Therefore, I am reaching out to your team to inquire whether it is possible to customize the email body to include the token during the recovery password process. If there are any additional resources or documentation available that could assist me in accomplishing this task, I would greatly appreciate it if you could point me in the right direction.

Thank you.

Player DatamultiplayerPlayStream
image.png (45.8 KiB)
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

·
Xiao Zha avatar image
Xiao Zha answered

The ConfirmationUrl parameter will be replaced with a URL(which contain the token you want) when the mail is generated. Currently, there is no way to get the token alone to include this token directly in the body of the email. You may post a feature request for it.

In addition, since “auth_token_validated” event will be generated when player selects the Url, you could get the token from the context of auth_token_validated event and store the token into player data, then call ResetPassword Admin API in Azure Function with the token to reset the password. For more information, you could refer to https://community.playfab.com/questions/44337/the-question-about-the-confirmation-email-for-forg.html, https://community.playfab.com/questions/44554/how-to-make-the-reset-password-function.html and https://community.playfab.com/questions/44653/how-to-build-a-custom-server-to-the-playfab-admin.html .

10 |1200

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

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.