question

rocketcolastudio avatar image
rocketcolastudio asked

Problem with GetPlayFabIDsFromGenericIDs

Hello, titleId is 6BF3D

I'm trying to retrieve the PlayfabID from a generic id with GetPlayFabIDsFromGenericIDs from our server, but so far I'm unsuccessful.

The player is created int the client using LoginWithCustomIDRequest.

Then when I try to retrieve the playfab id from our server, I get the following result(missing playfabid):

{"code":200,"status":"OK","data":{"Data":[{"GenericId":{"ServiceName":"Custom","UserId":"7593"}}]}}

The custom id appears correctly under the player Identities in the player overview in the console.

I also noticed that if I manually call the AddGenericID endpoint from our server with the id and then call GetPlayFabIDsFromGenericIDs it works properly.

I've tried miscellaneous ServiceName ids, like CustomID, ServerCustomID etc but also no luck.

Any recommendations ?

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

Hi @rocketcolastudio,

As a matter of fact, the Generic ID System is completely unrelated to the authentication mechanisms (the login/link/unlink API calls). Generic IDs aren't "linked" to the account in any real way, they're information only, and cannot be used for authentication. For instance, the “CustomId” in LoginWithCustomIDRequest has nothing to do with the Generic ID System, therefore you cannot get the PlayFabId using it with CustomId after players are created. The reason why you can successfully get the PlayFabId using GetPlayFabIDsFromGenericIDs after manually called AddGenericID is that the information was indeed added to the Generic ID system after calling AddGenericID, the “Custom” property has nothing to do with the “Custom” property in LoginWithCustomIDRequest though.

The Generic ID System was solely intended as a way to do a lookup of players by IDs that is not intended to be used for authentication. The ID in the system is completely insecure, it couldn’t be used as authentication credentials, which is why it has nothing to do with the authentication system.

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.

rocketcolastudio avatar image rocketcolastudio commented ·

Ok, I figured that out, but then can you explain why when I do AddGenericID it overrides the already existing custom id ?

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan rocketcolastudio commented ·

According to my test result, it looks like they don't affect each other, you can see that custom id in the player overview page is not changed. Could you provide your repro steps for me to investigate?

0 Likes 0 ·
madmojoman avatar image
madmojoman answered

Code 200 - For generic service identifiers which have not been linked to PlayFab accounts, null will be returned.

Have you tried making certain to link to a PlayFab account before trying to use it?

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.

rocketcolastudio avatar image rocketcolastudio commented ·

Yes of course, did you not read my post ?

The custom id appears correctly under the player Identities in the player overview in the console.

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.