question

mauro avatar image
mauro asked

LoginWithCustomId and then modify profile from Unity

So I am trying to do the following:

- new user, new device on iPhone

- create an account using the device unique id from Unity (SystemInfo.deviceUniqueIdentifier), passing CreateAccount = true;

- when the account is created, assign a random username (for example Player12345) and Display Name (for example Player 12345)

=> Question: what are the API I need to call after LoginWithCustomId to set the username and Display Name>

After this,

- If the user signs in with Facebook, then I want to change his Display Name to be the same as in Facebook, make the user choose a username, and set his picture icon and email.

=> what is the API that allows me to change the email/username/display name?

Thanks

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

·
brendan avatar image
brendan answered

To add a Username to an existing account (that doesn't have one), you would use: https://api.playfab.com/Documentation/Client/method/AddUsernamePassword. We'll be updating it soon to make the various input properties optional, so that if you only want to set Username, you'll be able to do so.

To add or change a Title Display Name, you can use: https://api.playfab.com/Documentation/Client/method/UpdateUserTitleDisplayName.

Please note that while a user can change the Title Display Name whenever, it must be unique within the context of the title (no other user can have the same Title Display Name). Also, Username and email address must be unique in the context of the Publisher ID - so, no two accounts across all games in your Studio (by default they have the same Publisher ID) can have the same of either. Those cannot be changed by a Client operation, though if necessary, you can change a user's email address via the PlayFab 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.