question

Marcus Ball avatar image
Marcus Ball asked

User ID Format?

I've been writing some server code for handling users, and naturally, this involves keeping track of Playfab user IDs that correspond with players. Previously, I had been validating incoming player IDs by checking if they were exactly 16 characters. Today, I just noticed that some players were not being handled because because there apparently exist 15 character user IDs as well.

Are there any defined characteristics for the format of user IDs that Playfab will generate? Do I need to be expecting possible user Ids shorter or longer than 15-16 characters?

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

Right now, the PlayFab ID is a 64-bit value, so technically it could be anything in that range. And since it could change in future, I would have to recommend just processing it as a generic string (since that's the format we use in our API calls), without validation checks. 

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.