question

Kim Strasser avatar image
Kim Strasser asked

Could a player use his PlayFab Id as username?

When a player starts my game the first time, then he is logged in with his iOS/Android device id. A little bit later, the player needs to use client API AddUsernamePassword.

Is it possible to use the players PlayFab Id as username when the player calls client API AddUsernamePassword?

I won't ask the player to enter a username in my game, I would automatically add his Playfab Id in the AddUsernamePassword call in my Azure function.

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

We don’t suggest you set the PlayFabID as the player’s Username. PlayFab designs PlayFabID and Username for different purposes. PlayFabId is public info, users can retrieve other’s PlayFabIds through multiple ways. But Username is a private info, it shouldn’t be exposed to other players. If you want to ignore the Username field when calling API AddUsernamePassword, you can try to add a feature request for it.

Besides, we suggest you call the Client API methods only on clients. As this thread descripted, the request of Client API has a very low rate limit. This limit is currently enforced by the IP address. If you call the Client API on server-side, there would be a great risk to exceed the limit.

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.

Kim Strasser avatar image Kim Strasser commented ·

Would it be possible to create a random 10 digit number for the players username? For example a number between 1.000.000.000 - 9.999.999.999.

The random number would be created automatically before the player calls AddUsernamePassword.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Kim Strasser commented ·

It's possible. You can generate the random number on the client.

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.