question

drallcom3 avatar image
drallcom3 asked

How to get player data without Playfab ID?

The player is logged into the game. He wants to link a Google login to his account. It's linked to another account already, so he gets a popup with some info.

Now I want to tell him the level of his current account vs the level of his Google account, so he can make an informed decision.

How do I get data from an account if I only know one login identifier? Public data would be fine. The only way I see is to log into each account, but that's not really practical.

apis
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

Getting player data without PlayFab ID is not supported. Currently related PlayFab APIs are based on PlayFab ID, otherwise, you need to login into that player account.

First of all, getting a valid Google access token means the user has passed Google’s verification process, which means in most of the cases, it is safe and we can assume the user owns this account. Second, as you have said “The player is logged into the game”, a PlayFab account should be created already. When logged in and LinkGoogleAccount is called, there will be 3 conditions in your scenario:

    1. (link fails) User selects local data to overwrite the Google-linked account.

      • Login into Google-linked account, call UnlinkGoogleAccount. Be aware that Unlink related APIs are only available in Client API.
      • Login into current local account, call LinkGoogleAccount
      • the previous Google-linked account will still exist but no identity to access

      2. (link fails) User selects Google-linked account to overwrite the local data.

      • This will be easy. Simply unlink the current Identity, like Device ID (this is optional and is upon to you.)
      • Call LoginWithGoogleAccount with existing access token
      • Call link device ID related API to link previous identity (optional), then sync the player data in client

      3. (Link succeeds)

      • Inform Link process is successful.
      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.

      drallcom3 avatar image drallcom3 commented ·

      I already have a working flow. I just wanted to know if a more informed overwrite prompt is possible, like other games have.

      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.