question

bluesky4900 avatar image
bluesky4900 asked

how can check customID Unique?

I don't know even if I look here and there.

generate a custom ID as a GUID and how do I check if this is unique? in playfab?

if already have an CustomID of "A" And if get a value of "A" when generate CustomID,

try to LoginWithCustomID with "A" , will be logged in.

how can solve it?

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

·
Sarah Zhang avatar image
Sarah Zhang answered

PlayFab disallows to link the same custom Id to multiple accounts, if you call the API – LinkCustomID to link a custom ID to the second account, it will return the error “LinkedIdentifierAlreadyClaimed”. Apart from the verification in the above API, we don’t provide a separate API to verify if the current custom Id exists or not.

As this thread - How to get unique id on the clinet (WebGL) - Playfab Community said, if you would like to ensure you can only generate the unique custom Id, you would either need to generate the Id based on the local device Ids, or else use an external cache, such as Azure Cosmos DB, to manage a count. And since it is very unlikely that two clients generated the same GUID randomly, you can ignore this situation directly. You can check the above thread for more information.

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.