I tried making a method for the player to recover their account but it does not work for some reason. the code:
public TMP_InputField recoveryEmailInput;
public TextMeshProUGUI messageText;
public void ResetPasswordButton()
{
var request = new SendAccountRecoveryEmailRequest
{
Email = recoveryEmailInput.text,
TitleId = "322C2"
};
PlayFabClientAPI.SendAccountRecoveryEmail(request, OnPasswordReset, OnError);
}
void OnPasswordReset(SendAccountRecoveryEmailResult result)
{
messageText.text = "Password recovery mail sent!";
}
void OnError(PlayFabError error)
{
Debug.Log("Error while logging in/Creating account!");
Debug.Log(error.GenerateErrorReport());
messageText.text = error.ErrorMessage;
}
PS. The above is only a PART of a bigger script. the above is just the part of that script that's responsible for account recovery
I have tried all of the following:
I have checked the Input field multiple times to make sure it's attached to the script.
I have checked the button to make sure it's calling the correct function (which is ResetPasswordButton).
I made sure that every word was spelled correctly.
the email Im entering in the Input field is attached to an account and can have emails sent to it.
I have tried multiple emails.
I have checked countless times that my Title Id is correct.
Every time, the result is always the same and it ends up giving me this error:
/Client/SendAccountRecoveryEmail: HTTP/1.1 500 Internal Server Error
UnityEngine.Debug:Log (object)
PlayfabManager:OnError (PlayFab.PlayFabError) (at Assets/Scripts/PlayfabManager.cs:53)
PlayFab.Internal.PlayFabUnityHttp:OnError (string,PlayFab.Internal.CallRequestContainer) (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:237)
PlayFab.Internal.PlayFabUnityHttp/<Post>d__12:MoveNext () (at Assets/PlayFabSDK/Shared/Internal/PlayFabHttp/PlayFabUnityHttp.cs:151)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
I have searched and found someone facing the same problem, but it was because TextMeshPro would have an extra hidden character. But even when I changed the Input field to legacy, the same error would happen.
Any help would be appreciated.