question

martintittenberger avatar image
martintittenberger asked

Is it possible to get other player's character's inventory?

We would like to fetch other player's character's inventory, so a player can view what loadout other players are using (similar to how it works in Destiny 2 for example). The only API calls I've found regarding this are:

https://blog.playfab.com/documentation/client/method/GetUserInventory (this only seems to return the inventory for the logged in user)

https://blog.playfab.com/documentation/client/method/GetCharacterInventory (this only seems to work for characters which are owned by the logged in player)

Player Inventory
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

·
pfnathan avatar image
pfnathan answered

You can view other player’s character’s inventory via Cloud Script by calling the Server API. Client/GetCharacterInventory is designed for a player to query the inventory of the characters belonging to his/her player account. If you want to get the character for an arbitrary player in the service, you would need to use the Server API call.

Please refer to; https://api.playfab.com/documentation/server/method/GetCharacterInventory

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.