question

bernardd avatar image
bernardd asked

Update Player statistics and call cloudscript from admin API

Hi everyone

I need to create a local, developer-only tool to change the value of a statistics of a player or execute a specific cloudscript script. The problem is the Admin API doesn't give anything to do this behaviour.

Is it possible do use the Server API in a local project to do those operations ?

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

·
Sarah Zhang avatar image
Sarah Zhang answered

Yes, it’s possible. You can access PlayFab server API freely if you have the secret keys. You can directly access the PlayFab Server API on most platforms. However, you should do some settings to enable PlayFab server API when using Game engines to make such admin tools. For example, on Unity, you need to navigate to [Windows]->[PlayFab]->[Editor Extensions], click the [Editor Extensions] to open the [PlayFab EdEx], then navigate to [PlayFab EdEx]->[Setting]->[API] check the [ENABLE SERVER API] to enable Unity PlayFab Server API. You can check the SDK quick start for how to use server SDK on other platforms. Most of the time, we don't need to do extra settings. Besides, whether we [Enable Server API] on the Game Engine or not we can directly access such API with Http POST function.

Admin API and Server API mostly have the same usage scenario except Cloud Script cannot handle Admin API.

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.

bernardd avatar image bernardd commented ·

The server API fulfills my needs. Thank you

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.