question

jcoriston avatar image
jcoriston asked

Admin calls?

This question most likely has an obvious answer, but I we weren't able to find it easily:

We're interested in utilizing the UpdateCatalogItems to have our server update the inventory of the game on Playfab. We were unable to see what the requirements were for making Admin API calls was?

Obviously things like banning users shouldn't be allowed in the Client API, so we were wondering what the process was for setting up and using Admin API commands. Particularly if there is any kind of authentication involved.

Happy to be pointed at documentation somewhere, we just weren't able to find anything after a bit of a search.

apisAuthenticationdocumentation
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

·
brendan avatar image
brendan answered

The Admin (and Server) API calls need to have the Secret Key in their header as the X-SecretKey parameter. You can see examples of this in our documentation for the Server/Admin API calls (ex: https://api.playfab.com/documentation/admin/method/BanUsers), as well as in our SDKs and Postman collection (https://api.playfab.com/sdks/postman - I highly recommend Postman as a handy tool for testing Web API calls).

So, calling UpdateCatalogItems (or any other Admin API call) from a server is quite simple. But can you detail more about your use case? Bear in mind that updates to title-level configuration information, like catalogs and title data, should be fairly infrequent, and cannot be triggered based on a client-originating action. How are you planning on using that API method?

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.

jcoriston avatar image jcoriston commented ·

Awesome, thank you for the info!

Postman looks great, we will give that a shot!

The use case seems appropriate - allowing our designers to bulk edit and update our catalog of 'items' without having to hand-edit things in the PlayFab cms - most likely a few times every few weeks, if we're doing it right!

0 Likes 0 ·
brendan avatar image brendan ♦♦ jcoriston commented ·

Yes, an Admin tool for use by your designers is a perfect use case - thanks for clarifying!

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]