question

Mr Slo avatar image
Mr Slo asked

As an admin, trigger cloudscript / Function in behalf of the player

Is it possible to call cloudscript using the secret key in behalf of a player ?
E.g for external services triggering the cloudscript to give match rewards.

The only solution i found is one that requires an Entity Token, aka a session to be re-stablished everytime, and even tho according to docs it would run the script to that entity and not the player entity.

CloudScriptentities
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

·
Xiao Zha avatar image
Xiao Zha answered

You can call Server API: Server-Side Cloud Script - Execute Cloud Script - REST API (PlayFab Server) | Microsoft Learn with Secret Key and PlayFabId to trigger CloudScript. Or you can call Admin API: Player Item Management - Grant Items To Users - REST API (PlayFab Admin) | Microsoft Learn directly with Secret Key and PlayFabId to grant items to player.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.