question

salem908mk avatar image
salem908mk asked

Economy V2 add currency to player

How may I initiate the POST request to "https://titleid.playfabapi.com/Inventory/AddInventoryItems" utilizing a server entity token? Additionally, where should the PlayFab ID be specified or positioned?

In-Game Economy
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

If you are using the API in your project, in the AddInventoryItems API’s request body, you may set the AuthenticationContext property of AddInventotyItems API with the Title Entity and Title Entity Token, then, you may need to specify the Entity property with the title_player_account entity (which is different from the PlayFabId). You may refer to Available Built-In Entity Types - PlayFab | Microsoft Learn to have more information about Entity.

If you are testing the API with Postman, you can specify the “X-EntityToken” property in the header with Title Entity Token, then specify the Entity property in the AddInventoryItems API’s request body with the title_player_account entity.

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.