question

Robert Hinze avatar image
Robert Hinze asked

Possible to List Games in a Profile with Master_Player_Account?

Greetings,

I currently try to mess arround with TitleIDs and the MasterAccount of a User.


From my Understanding, the User generates a Master Account the first time he registers to our Game, when we then decide to create a new Game (which will be a new Title ID) the User could use a Button, to join our new Game, so he can use the same Login Informations, used before.

Now, that we own 2 Games, is it possible to display for the user, that he joined both games?
I tried to use EntityToken to querry the "Master_Player_Account" but for some reason, you always get the title_player_account in Return.

So TL:R is there a way to use the "normal" (non Admin) API to return all TitleIDs the User has joined with his Master Account?

https://xxxx.playfabapi.com/Authentication/GetEntityToken

{"Entity":[{"id":"MasterAccoundID","Type":"master_player_account"}]}

Returns:

{ "code": 200, "status": "OK", "data": { "EntityToken": "X", "TokenExpiration": "X", "Entity": { "Id": "TitleID", "Type": "title_player_account", "TypeString": "title_player_account" } } }
Account Management
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.

Robert Hinze avatar image Robert Hinze commented ·
0 Likes 0 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

The most straightforward way to list all the titles that the player has played is by using the admin GetPlayedTitleList API. However, if you want to use “normal” API instead, please note that currently there is no direct way to do that. As a workaround, you can use GetTitlePlayersFromMasterPlayerAccountIds to achieve this:

Specify the title id you want to examine for the master player in the request:

{
  "MasterPlayerAccountIds": [
    "x"
  ],
  "TitleId": "title1"
}

If the master player hasn’t played this title, the result would be null:

"data": {
        "TitlePlayerAccounts": {
            "x": null
        }
}

In this way, you can find out which title did the player played and display whether he joined both games or not accordingly.

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.