Player Inventory Quickstart

Walkthrough for showing inventory in player wallets

Now that you've deployed a collection and minted an NFT for a user, let's check the players wallet for that NFT.

With Blockus, you're able to pull in all of a player's inventory, across all wallets that are utilized in each game/project. This really shows the power of Blockus, allowing games to use NFT assets across different chains and use cases.

Player Inventory - Video

Player Inventory - Walkthrough

Show all assets belonging to a single player

Use /players/wallets to easily get all assets that a player owns in a project (game).

curl --request POST \
     --url https://blockus.net/v1/players/wallets \
     --header 'X-PROJECT-ID: <yourProjectId>' \
     --header 'X-PROJECT-KEY: <yourProjectKey>' \
     --header 'X-ACCESS-TOKEN: <userAccessToken>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \

You can also get raw wallet addresses by specifying the chain as a path parameter. This endpoint is also used for wallet related actions, such as consume NFTs, send NFTs, or sign transactions. See API documentation for the full list of capabilities.

Show assets from a specific collection

You can also specify a collection to show. This is useful when you want to filter items by type, store, or however you've designed your game's set of collections.

curl --request POST \
     --url https://blockus.net/v1/player/wallets/collections/<collectionId> \
     --header 'X-PROJECT-ID: <yourProjectId>' \
     --header 'X-PROJECT-KEY: <yourProjectKey>' \
     --header 'X-ACCESS-TOKEN: <userAccessToken>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \

We've designed the inventory APIs to be both simple to use and powerful, doing much of the work for you.

📘

Note

To maximize performance, /v1/players/wallets pulls information from DB, while /v1/players/wallets/collections pulls the latest status directly from the blockchain. If you're optimizing for real-time status, please iterate through your collection list.

For studios using PlayFab, we also have two PlayFab endpoints that returns items in PlayFab format so that you don’t have to rewrite your web2 game logic. See API documentation for usage.


What’s Next

Other NFT Operations