#Access Cloud Script using Generic EntityToken from Secret Key

3 messages · Page 1 of 1 (latest)

raven drift
#

Recently we have been updating Grant Items to a user to the Inventory V2, one of the thing out application is required to do is perform these operations without a logged in user. We implemented a new handler in the Cloud Script to reduce multiple call on our back end example.
https://titleId.playfabapi.com/Catalog/SearchItems
https://titleId.playfabapi.com/Inventory/ExecuteInventoryOperations

Is there a way we can execute this operation on cloud script without a Entity token that is tied to a user

stuck sorrel
#

Inventory/ExecuteInventoryOperations is what you need. You can batch all the inventory operations in one call for one player account.
Also, if you need to operate on a specific user in CloudScript, you only need to know their player account ID, as that's also their EntityKey ID, and you specify the EntityKey Type as title_player_account in the Enity property of the request. You don't need the player's EntityToken to do these operations, as your CloudScript should already be provided a title-level EntityToken to operate on any player entities within the title.