question

Gilbert Villanueva avatar image
Gilbert Villanueva asked

How can you recover an account that only has TitleDisplayName and ContactEmail but no Username and EmailAddress?

Account Management
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Do you mean that one of the players of yours wants to recover his/her account but only remembers the TitleDisplayName and ContactEmail? If that’s the case, I think ContactEmail alone should be enough for you to recover the account for him, please refer to this doc to learn more about sending account recovery email (sent to contact email): Using email templates to send an account recovery email.

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.

Gilbert Villanueva avatar image Gilbert Villanueva commented ·

So our players created the PF accounts via LoginWithDevice, and some added their contact email as additional info. However, when they delete their game and reinstall it, the device id changes and PlayFab creates a new account off of that new device id. I need a way to recover that account without creating a new one.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Gilbert Villanueva commented ·

In your case, you can search that particular player with the TitleDisplayName provided by the player by typing the following query statement in the search bar in this page https://developer.playfab.com/en-US/your_title_id/players :

displayName: TitleDisplayName

In this way, you can find that player, and recover his/her account by replacing the old device id with the new one or any other methods you can think of.

Moreover, I must remind you that accounts created using LoginWithDevice are anonymous, which means that once the Device Id is lost it would be very difficult to recover those accounts, often times leaving them orphaned. That's the reason why we suggest you add a recoverable login mechanism for the player to prevent loss of their accounts once the anonymous login is complete: Login basics and best practices. In your case, fortunately, you have the TitleDisplayName of that player, which can be used to trace back to that account. Without it it would be really difficult to recover that account.

0 Likes 0 ·
Gilbert Villanueva avatar image
Gilbert Villanueva answered

So going back to my original question, how exactly do I do that through the API? We can recover it manually but we want the users to be able to switch to their accounts from the client.

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.

Citrus Yan avatar image Citrus Yan commented ·

In your case, you cannot do that through API. You must add at least one recoverable login mechanism for the players so that he/she can use that to log into their accounts and call LinkDeviceID, for instance, LinkAndroidDeviceID, to switch to their accounts from the client.

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.