End-to-end Example
Programmatic gating for customers holding an Ethereum ERC1155 NFT
1. Get your API keys
Create a 3mint account and find your API key on the Settings page.

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
The key received should remain secret, which means it should only be accessed on the back end. Authorization to the API is performed via the X-API-KEY header.
2. Check Ownership
To verify whether a user has the right NFT, send an authenticated request to the tokenGate endpoint from your website. If you would like to add over parameters (length of time held, quantity held, metadata attributes, please check our Token Gating guide)
curl -X POST https://api.3mint.io/api/v1/tokenGate
-H "Content-Type: application/json"
-H "X-API-KEY: [YOUR_API_KEY]"
-d '{"walletAddress": "[WALLET_OF_USER]",
"chain": "ethereum",
"network": "mainnet",
"requirements": [
{
"type": "erc721",
"contractAddress": "[PROJECT_CONTRACT_ADDRESS]",
"minBalance": 1,
}
]
}'
Response (by default)
{ "result" : true }
Last updated