Authentication
nofakemails uses API keys to authenticate requests. Your API keys carry many privileges, so be sure to keep them secure. If you haven't made your first request yet, start with the Quickstart Guide.
Getting Your API Key
To obtain an API key:
- Sign up or log in to your nofakemails dashboard
- Navigate to the API Keys section
- Click "Create API Key" and provide a descriptive name
- Copy your secret key immediately - it will only be shown once during creation
Keep Your API Keys Secure
Your API keys should be treated like passwords. Never expose them in client-side code, public repositories, or share them publicly. Always store them as environment variables or in secure configuration management systems. If your API key is rejected, see the INVALID_API_KEY error for troubleshooting.
API Key Authentication
All API requests must include your API key for authentication. The API supports two options for providing your API key:
Option 1: X-API-Key Header (Recommended)
The recommended approach is to include your API key in the X-API-Key header:
curl -X GET "https://api.nofakemails.com/v1/email/user@example.com" \
-H "X-API-Key: your_api_key_here"Option 2: Authorization Bearer Token
Alternatively, you can include your API key as a Bearer token in the Authorization header:
curl -X GET "https://api.nofakemails.com/v1/email/user@example.com" \
-H "Authorization: Bearer your_api_key_here"