How to Verify That a Wallet Owns an NFT

Follow this tutorial to learn how to verify that a Wallet owns an NFT.

This tutorial explains the steps in verifying that a given wallet in the Ethereum Mainnet network owns a given NFT.

Step 1. Use the assets endpoint with the following details:

  • protocol: ethereum

  • network: mainnet

    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets
    

Step 2. Add the following parameters:

  • contract address

    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
  • token ID

    • parameter: token_id
    • value: e.g. 9999
  • wallet address

    • parameter: wallet_address
    • value: e.g. 0x46Fd6B647Dc8C82aD8f6cf0CC6b22ACad3f6e39d
  • wallet filter

    • parameter: show_wallets
    • value: e.g. true
    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999&wallet_address=0x46Fd6B647Dc8C82aD8f6cf0CC6b22ACad3f6e39d&show_wallets=true
    

Step 3. Execute the query.

For example, in cURL, you should run the following code:

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999&wallet_address=0x46Fd6B647Dc8C82aD8f6cf0CC6b22ACad3f6e39d&show_wallets=true' -H 'Authorization: Bearer YOUR_API_KEY'

📘

Note!

To authorize your request, you need to get an API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

Step 4. If the wallet owns the specified NFT, the query will return the NFT. Your results will look something like this example response:

{
    "data": [
        {
            "id": "5e1f4454-34ff-5118-9987-96b481625128",
            "token_id": "9999",
            "image_url": "token/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/5e1f4454-34ff-5118-9987-96b481625128.png",
            "name": "#9999",
            "contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
            "wallets": [],
            "burned": false
        },
        {...more assets...}
    ],
    "meta": {
        "paging": {
            "next_page_token": "eyJ0b2tlbl9pZCI6OTgyOCwidWlkIjoiNjMzOWIzMWYtNjg1Yi01ZDA1LWIyNmYtNDliNTc2M2E0ZDUzIn0="
        }
    }
}

If the ownership is not verified, the query will return an empty array:

{
    "data": [],
    "meta": null
}

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.