question

Dale Strickler avatar image
Dale Strickler asked

Detect account links

I am looking for the most effective way to tell if a player is linked via other devices.

We are looking for a way to read the linked connections. As an example, if someone logins in via a web browser version (PlayFab login with username) of the game how do we detect if they have device linked accounts like iOS or Android, etc.

As an example, I have been checking the result from the GetPlayerCombinedInfo

result.InforResultPlayload.AccountInfo.AndroidDeviceInfo != null

But this seems to not work. The payload has the information as null even when there is a link.

For the GetPlayerCombinedInfo request I am using:

public GetPlayerCombinedInfoRequestParams CombineInfoParamsAuth = new GetPlayerCombinedInfoRequestParams
{
    GetTitleData = true,
    GetPlayerProfile = true,
    GetUserData = true,
    GetUserInventory = true,
    GetUserReadOnlyData = true,
    GetUserVirtualCurrency = true,
    TitleDataKeys = Enum.GetNames(typeof(TitleDataKeys)).ToList(),
    UserDataKeys = Enum.GetNames(typeof(PlayerRwDataKeys)).ToList(),
    UserReadOnlyDataKeys = Enum.GetNames(typeof(PlayerRoDataKeys)).ToList(),
};

Doing a fair amount of searching I am not finding a way to test if the logged-in player is linked to x type of account.

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

·
Seth Du avatar image
Seth Du answered

In GetPlayerCombinedInfoRequestParams properties assignment, you may add:

"GetUserAccountInfo": true,

As you may see you are using “result.InforResultPlayload.AccountInfo.AndroidDeviceInfo” and the access constraints of AccountInfo should be specified in the request.

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.