question

Kemal avatar image
Kemal asked

Resend email confirmation from Error Callback screen

I implemented confirmation email via "contact email". Confirmation link expires in 24 hours. I added "Callback url" in email template. If link is expired Playfab redirects to url like this "mysite.com/confirmation_error?token=EDFABDA592AF1C5B&templateId=7430E58EA2C8806C&errorCode=EmailConfirmationTokenDoesNotExist".

How can I resend confirmation to email again? Thanks!

10 |1200

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

Rick Chen avatar image
Rick Chen answered

Apologize for my mistake, I thought you were sending account recovery email.

In this case, you may write a function in a custom server or CloudScript to call SendEmailFromTemplate API. Your website should ask the user to login first, then provide a way to call this function from your custom server or CloudScript. Please note that the SendEmailFromTemplate API is a server API, which requires the “SecretKey”, and please do not expose the “SecretKey” on your website for security reason.

10 |1200

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

Rick Chen avatar image
Rick Chen answered

You could add the SendAccountRecoveryEmail API call to your website. For example, if your website is built with NodeJS, you could follow this document: Quickstart: PlayFab client library for NodeJS. You could add an input and ask user for their email address, put your title id and template id to the request body and make a button to call the SendAccountRecoveryEmail API.

2 comments
10 |1200

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

Kemal avatar image Kemal commented ·

Thanks bro!

0 Likes 0 ·
Kemal avatar image Kemal commented ·

I get an error "The template type for 7430E58EA2C8806C is a EmailVerification template type which is not an AccountRecovery type"

0 Likes 0 ·
Kemal avatar image
Kemal answered

I did what you said, however I get an error "The template type for 7430E58EA2C8806C is a EmailVerification template type which is not an AccountRecovery type"

10 |1200

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

Kemal avatar image
Kemal answered
@Rick Chen

What else can I do? thanks

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.