question

dwojda avatar image
dwojda asked

What is the difference between LinkedDeviceAlreadyClaimed and DeviceAlreadyLinked?

These are possible error codes returned by API calls LinkAndroidDeviceId and LinkIOSDeviceId.

Authentication
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

·
brendan avatar image
brendan answered

Here's the extra info you get back in the errorMessage part of the response for those two error codes:

LinkedDeviceAlreadyClaimed: "That device is already linked to a different user."

DeviceAlreadyLinked: "User already linked to a different device."

4 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.

kevin-4 avatar image kevin-4 commented ·

In what situations would DeviceAlreadyLinked be fired? From the above message, it seems like that's saying the recoverable login account already has a different device linked. But isn't the ability to link multiple devices to one account the default with Playfab?

Also, is LinkedDeviceAlreadyClaimed only fired when linking the current device will result in an account being 'orphaned', or does it fire even if the current device is linked to an account with multiple devices attached?

0 Likes 0 ·
brendan avatar image brendan kevin-4 commented ·

DeviceAlreadyLinked would be returned in any case where it's not possible to have more than one of a given device linked to an account. It used to be the case that accounts could only have one linked iOS device and one Android device, so it's more historical (though could be used for another device, potentially, in future).

LinkedDeviceAlreadyClaimed is saying "no, we're not linking you to that account, because it's linked to another user". So the other user's account isn't changed, and the device is still linked to it.

0 Likes 0 ·
kevin-4 avatar image kevin-4 kevin-4 commented ·

For anyone who finds this thread in the future:

My above question of "...is LinkedDeviceAlreadyClaimed only fired when linking the current device will result in an account being 'orphaned'..." is actually applied to the error code LinkedIdentifierAlreadyClaimed.

Just ran into this error for the first time. The set up was:

  1. Current PC was the only device/login linked to PlayerAccount1.
  2. I then logged into a Playfab account that was attached to PlayerAccount2 from my PC.
  3. I then tried to link the PC to PlayerAccount2 using LinkCustomIDRequest and forcelink set as false.
  4. Since PlayerAccount1 had no other device/login attached other than the PC and would effectively be 'orphaned', PlayFab sent back LinkedIdentifierAlreadyClaimed. Ran again with forcelink set to true, and the linking succeeded. PC is now linked to PlayerAccount2 and now PlayerAccount1 had no other means of being logged back into.

Just adding this to complete the descriptions for all the related 'device already claimed/linked' messages. If any of this is a misunderstanding on my part, feel free to correct me PlayFab team.

0 Likes 0 ·
brendan avatar image brendan kevin-4 commented ·

Technically, it means that the specific login mechanism you are forcing to link to a different account will be removed from the account it's currently on. If that's the only means you have to log into the player account, then yes, in that case it would be 'orphaned'.

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.