I am trying to use a custom recovery email to send players a password reset link. I've made sure that my users assign their contact email on top of their sign in email. Using the SendAccountRecoveryEmail client API in the newest Unity SDK results in the AccountNotFound error, despite using an email I know my test account has as their contact email.
I also tried using the API from your website (https://api.playfab.com/documentation/client/method/SendAccountRecoveryEmail) but I get an unexpected error, attached.
I also tried using https://api.playfab.com/documentation/server/method/SendEmailFromTemplate and https://api.playfab.com/documentation/server/method/SendCustomAccountRecoveryEmail but both "Call API" buttons did absolutely nothing.
I also want to mention that manually assigning the contact email in the dashboard results in a "Internal Server Error" (attached, I used a fake email in the attachment but using a real email doesn't work either) but the client API works just fine.
https://www.dropbox.com/s/1szjfmqz4teom0m/ClientError.jpg?raw=1
https://www.dropbox.com/s/wkftiro39mpde4y/ServerError.PNG?raw=1
So, account login and account recovery are done using the Master Account email address, while template emails are sent to the player at the title-level contact email address. I haven't seen the TryIt fail in the way you're describing, though - I take it all your tests are on Title ID 3E94?
that is correct. I had some limited success using another title but considering that this is the title I need it to work in I spent the most time testing in there.
As there are multiple issues in this one post I will break down my experience so that each is separate:
Using the https://api.playfab.com/documentation/client/method/SendAccountRecoveryEmail API
copying my title ID into the TitleId field doesn't work. I've even tried manually typing in my Title ID so there are absolutely no control characters. Regardless of if the email is valid or not I always get "TitleId: must be a hex-encoded number"
https://api.playfab.com/documentation/server/method/SendEmailFromTemplate
https://api.playfab.com/documentation/server/method/SendCustomAccountRecoveryEmail
The "Call API" button does _nothing_. I've tried both Edge and Chrome but clicking the button does not execute the server API. There are no errors, literally nothing happens.
Finally. Using SecondAccountRecoveryEmail from my client (so not from your site) yields the result "AccountNotFound" error. As you mentioned that uses Master Account email address while the templates use the title specific email address. I am accounting for that in all of my tests. I am using a test account with identical Master Account and Contact email addresses.
If it helps the user I am testing with is 192D734C13D12996, the title ID is 3E94, and my publisher ID is ECBE7283E7D1123A
Ah, interesting. The site isn't correctly turning your Title ID into a string, for some reason. If you add quote marks to it, it does work fine ("3E94" rather than just 3E94). I'll file a bug to get that fixed, but that'll get you past the issue.
For the template issue, what is the ID of the template and the PlayFab ID of the user you're testing (it that also 192D734C13D12996)?
For the call from the client, I just tested that, using the two email addresses (different only by case) for that account, and since it's the same email address (again, just case difference), it worked both times. Can you try putting in a breakpoint and checking the specifics of the values you're passing into the parameters?
The template is 578E2565EA1E8DE3.
I updated my client and it seems to be working now. I'm getting SmtpServerGeneralFailure from the server but I think that's on my end not yours. As long as I can get the Smtp add-on to work then I shouldn't need the server APIs, but you should definitely get them fixed for the next person.
2 People are following this question.