question

duartedd avatar image
duartedd asked

playfab server api

so im trying to understand how to program by game to work with the playfab server

client vs server vs admin apis

so for instance i grant an item to a user - this is a server api call

where do i run this - whats the general way to program a game with playfab?

do i on the client apk have login calls and such and then somehow create a seperate server that runs something that will call the server api calls to the playfab backend?

or do i just call the server and client apis from the apk that i am sending out to the playerS? (but then doesnt that defeat the purpose of seperating the 2?

if it is i am supposed to come out with a way of creating a separate application or program that will handle calls from the client and then interface with the playfab then how is this generally done? or does playfab provide such a way for this?

for instance lets say i want to when i register and successfully login and if i dont have my characters setup i will create them

so client will call a loginwithcustomid method

playfab completed this and client logs in

the player is provided with character tokens from the server*

the character stats and information is added onto the characters (stats information etC)*

the client needs to be sent to the character creation name screen*

client submits the name data to the playfab updating the character details of their names

so the stuff with the *s are what i have issue with where do i run the api calls and how do i program my game to call these api calls?

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

·
pfnathan avatar image
pfnathan answered

When it comes to client vs. server API;

You can use Server APIs hosted on your own servers as it takes the title's secret to execute those commands. You would never want to run both on the same client, as yes, it does defeat the purpose.

Server and admin APIs are generally run via internal tools and internal scripts. They load the SDK and/or call the Web APIs directly via CURL and/or Postman.

And other answers to the questions can be founded in our documents, Please refer to following links;

https://api.playfab.com/docs/general-getting-started

https://api.playfab.com/docs/tutorials

Please note that we do not provide general programing support but as we noted we have comprehensive guide documentation available. To test your API calls you can use Tutorial section as your guide. Also, Please take a peek at https://api.playfab.com/docs/tutorials/execute-playfab-api-via-postman for guide on how to execute API calls using "Postman" tool.

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.

duartedd avatar image duartedd commented ·

Thanks so to sum it up...I have to find out a server solution...for now I am going to try cloud scripting as it sounds that will work for my needs.

Thanks again or the help!

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.