User's Token Balance
This API endpoint allows you to get the token balance of the user.
Endpoint
GET /getDetails/:tokenAddress/:userAddress
Authentication
All requests to our GET API require authentication. You will need to include your API key in the header of each request. You can find your API key in the "API Keys" section of your PerkVenue dashboard.
Request Headers
The following request header is required to use the NFT Minting API:
Authorization
- Your PerkVenue API key
Request Format
Add following Query at the end of the endpoint to get details of a specific token:
tokenAddress
- The contract address of the tokenuserAddress
- Address of the user whose Balance you want to find.
Example Request
/tokens/getDetails/0x7682B039993c1fB9a13D3B1a87368977DC8565f2/0xB78721b29c028B16ab25f4a2adE1d25fbf8B2d74
Response
The API will respond with a JSON object containing the following information:
userBalance
: Token Balance of the user.
Example Response
{
"userBalance": "0"
}
Error Responses
In case of an error, the API will respond with a JSON object containing an error message:
{
"error": "Error message"
}
Conclusion
The GET /getDetails/:tokenAddress/:userAddress
endpoint allows you to retrieve user's token balance.