question

michaelbb avatar image
michaelbb asked

Update/change password

Hi there,

Once a player register via email and password, he might be willing to change either email or password or both. I tried to implement that by calling "AddUsernamePassword" method.

But I got the following error which I could not figure out why this happens: Invalid input parameters

private async void ChangePassword()
        {
            
            var email = await PlayFabClientAPI.AddUsernamePasswordAsync(new AddUsernamePasswordRequest()
            {
                Username = MyUser.Text,
                Email = EMail.Text,
                Password = txtPasswort.Text,
                
            });
            if (email.Error != null) txtMsgReset.Text = email.Error.ToString();
            else
                txtMsgReset.Text = "Complete";
        }

What is going wrong here, or do I miss anything??

Many thanks.

best wishes,

Michael

Player DataAuthenticationwindows
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

·
brendan avatar image
brendan answered

AddUsernamePassword is used to add Username, Email Address, and Password to accounts that do not already have those elements. To change password, you would use one of the various account recovery email API calls (ex: https://api.playfab.com/documentation/client/method/SendAccountRecoveryEmail). However, allowing for changing email address is a potential security risk in the current model, so it needs to be managed by your customer relations team, using the Game Manager.

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.