question

Iain Brown avatar image
Iain Brown asked

ClientAPI: How to get Display Name from Title Id?

If I have a title player id (from, in this instance, a Playfab Party endpoint being created) how do I turn that into a display name?

I've tried PlayFabClientAPI::GetPlayerProfile but that requires the master playfab id for the player, which I don't have, and I've tried PlayFabProfilesAPI::GetProfile which does take a title player id, but always returns an "Unauthorized" error. (As a side note, I'm not really clear if the client should only ever call functions in PlayFabClientAPI, or if it's allowed to make calls from other classes)

I'd rather not send the data peer to peer as it's too easy to spoof

Any ideas?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image
Seth Du answered

For now, we are working on the migration of legacy data model to the new entity model, which means some properties cannot work properly. The DisplayName returned in the GetProfile is different from GetPlayerProfile's. A work around solution is to use title player ID in GetProfile to retrieve master player ID (PlayFab ID) then call GetPlayerProfile for DisplayName.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kennyroy avatar image
kennyroy answered

You you have to make sure that you are allowing clients can see display names in the game manager- it's in one of the settings.

Then with the profile call you must include in your arguments the show display name and show Avatar URL (or any other profile info you want back). Set any that you want to get back to true.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Iain Brown avatar image Iain Brown commented ·

You're talking about PlayFabClientAPI::GetPlayerProfile here? That doesn't help, unfortunately, as I still have the wrong id, I have the "title_player_account" id, rather than the player's global playfab id. I don't see anyway of converting the ids in that direction (although there are calls to convert the other way)

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.