question

Alo Chatterjee avatar image
Alo Chatterjee asked

SendAccountRecoveryEmail returns InvalidAPIEndpoint error

I am on Unity 2018.3.0 and using this code to request a password recovery email:

var request = new SendAccountRecoveryEmailRequest { Email = email};
PlayFabClientAPI.SendAccountRecoveryEmail(request, OnRecoveryEmailSendSuccess, OnRecoveryEmailSendFailed);

The call fails with the error message: /Client/SendAccountRecoveryEmail: InvalidAPIEndpoint

I have entered the TitleId in the settings and I am able to sign in and post scores to leaderboards so surely that's not the problem. What else can cause this error?

Account Management
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

·
Sarah Zhang avatar image
Sarah Zhang answered

Please check this API Send Account Recovery Email. TitleId is required in the request body. Please add it.

var request = new SendAccountRecoveryEmailRequest { Email = email, TitleId = titleId };
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.

Alo Chatterjee avatar image Alo Chatterjee commented ·

Thank you, that was it! But I am surprised that the title id needs to be explicitly specified for this api call. There are many other calls that require the title id but I don't need to specify it explicitly in the request. I just assumed that the request class must be inserting it automatically wherever it is required.

0 Likes 0 ·
Stewart L. McCready avatar image Stewart L. McCready commented ·

Having come accross this solution when running into the same issue.

Is there a reason this function call doesn't include grabbing the TitleID from PlayFabSettings like the other functions within PlayFabClientAPI?

var callSettings = PlayFabSettings.staticSettings;
request.TitleId = request.TitleId ?? callSettings.TitleId;

Seems odd that some functions do this but others don't as it seem arbitary

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.