question

gbogarin avatar image
gbogarin asked

Login server side

Using PlayFabClientAPI.LoginWithCustomID I can get the playfabid in the client, how can I do the same with the server api (java). I have a custom server and a database with users, I'm using the user id as a custom id for the login with playfab so since I already have the custom id in the server I don't want to rely on the client to get the playfabid. Tried PlayFabServerAPI.LoginWithServerCustomId but it seems to have another purpose.

apissdksCustom Game Servers
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

·
Seth Du avatar image
Seth Du answered

The design purpose of ServerCustomId is helping developers/manager to login this player on the server side without client API.

If it is your own secure server, it will be fine to use any types of API calls. May I ask are you asking for "getting PlayFab ID from Custom ID"? If it is the case, currently there is no such supported API.

In addition, you may directly cache the PlayFab ID on your external server, along with custom ID.

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.

gbogarin avatar image gbogarin commented ·

Yes, I didn't want to rely on the client to get the playfabid, I wanted the server to create a new player as soon as a new user is added to my database, because right now the server relay on the client to get that playfabid (and then store in the database) and I don't like that extra request. I was thinking that maybe I could use the java client api in the server to do the login as a client and get the playfabid, didn't try yet.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ gbogarin commented ·

You may try to add client API on your server. If there are any other questions, please feel free to send a new thread on the forum.

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.