Read IDs of NFTs in a Wallet

To list the token IDs of NFT items that belong to the same collection and wallet, send a GET request to the /wallet/erc721/tokens endpoint, calling the :retrieve method. The wallet name and NFT contract address are passed as query parameters.

Read the NFTs for a wallet

GET https://api.playfix.io/wallet/erc721/tokens:retrieve

Query Parameters

Name
Type
Description

wallet*

String

Name of the Wallet.

contractAddress*

String

NFT Contract Address.

Headers

Name
Type
Description

Authorization*

String

Bearer <your_access_token>

{
  "tokenIds": [
    "string"
  ]
}

Example cURL API Call

curl --request GET \
  --url 'https://api.playfix.io/wallet/erc721/tokens:retrieve?walllet=<wallet_name>&contractAddress=<nft_contract_address>' \
  --header 'Authorization: Bearer <your_access_token>'

Example Python API Call

import requests
import json

wallet = "<wallet_name>"
nftContractAddress = "<nft_contract_address>"

r = requests.get(
    "https://api.playfix.io/wallet/erc721/tokens:retrieve?" +
    "wallet=" + wallet + "&contractAddress=" + nftContractAddress,
    headers={
        "Authorization": "Bearer <your_access_token>",
        "Accept": "application/json",
        "Content-Type": "application/json",
        }
    )

print(r.text)

Response

{
  "tokenIds": [
    "1"
  ]
}

The response is the token IDs of NFT items in the same collection and wallet.

Last updated