Authentication
Overview
EZMint uses API keys for authentication. Each request to the API must include your API key in the Authorization header.
Getting Your API Key
1. Sign up for an account at ezmint.xyz
2. Navigate to the API Keys section in your dashboard
3. Generate a new API key
Using Your API Key
HTTP Header
Include your API key in the Authorization header of all requests:
Authorization: Bearer YOUR_API_KEY
Example Request
curl -X POST https://api.ezmint.xyz/api/collections \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Collection"
}'
Security Best Practices
Keep Your Key Safe
- • Never share your API key or commit it to version control
- • Use environment variables to store your API key
- • Rotate your API key periodically
- • Use different API keys for development and production
Error Handling
If your API key is invalid or missing, you'll receive a 401 Unauthorized response:
{
"error": "Invalid or missing API key"
}