Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by gbogarin · Jul 20, 2020 at 11:03 PM · apissdksCustom Game Servers

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.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

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.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image gbogarin · Jul 21, 2020 at 02:08 PM 0
Share

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.

avatar image SethDu ♦ gbogarin · Jul 22, 2020 at 05:15 AM 0
Share

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.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    PlayFab Multiplayer 1 Answer

    Title ID in custom game servers 1 Answer

    Curl error 6: Could not resolve host in MockVmAgent 1 Answer

    Does having PlayFab Editor Extension in Unity and enabling server API expose the developer secret key? 1 Answer

    Possible for a server to retrieve its own tags (GameInfo)? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges