question

Stefano Zinna avatar image
Stefano Zinna asked

Way of working with LinkAndroidDeviceID

When they start to play with my game players use their mobile ID to connect to their account (Account A, LoginWithAndroidDeviceID). After some time they normally use their passwor&email to connect to their newly generated account (Account B, LoginWithEmailAddress). I use LinkAndroidDeviceID to connect the mobile ID to the newly generated account B. However the account A is still present and visible in leaderboards. What I do: just after that they generated account B, I copy their leaderboard value from account A to B. From now on they will play with account B and update its value in leaderboard. Also I set to 0 the leaderboard value for account A. Is this the best way of working or would you suggest a better one?

Account ManagementLeaderboards and Statistics
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

·
Gosen Gao avatar image
Gosen Gao answered

Since you create two different accounts with two different login methods, they cannot be merged to one. And Account Management - Link Android Device ID - REST API (PlayFab Client) | Microsoft Learn is not an API to merge accounts, it is used for adding additional login method to exist account. For your case, you can use Account Management - Add Username Password - REST API (PlayFab Client) | Microsoft Learn for account A first, then players can use LoginWithEmailAddress to login account A, without generating account B.

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.

Stefano Zinna avatar image Stefano Zinna commented ·

Would be still working if the same player has two devices? Let's say he started with device 1 and create account A. Then he add username&password as you suggested. Afterwards he use a second device 2. If he login with previous username&password and device 2, he will still be connected with the same account (A)?

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Stefano Zinna commented ·

Yes, using Authentication - Login With Email Address - REST API (PlayFab Client) | Microsoft Learn player can login the same account on any device.

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.