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.
Answer by SethDu · Jul 21, 2020 at 08:26 AM
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.
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.
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.