API Key Authentication
All Data Docked API requests require authentication using an API key. Pass your API key in thex-api-key header with every request.
Getting Your API Key
Create an account
Sign up at datadocked.com/signup
Navigate to API Keys
Go to your dashboard and find the API Keys section
Best Practices
Keep Your Key Secure
- Store API keys in environment variables
- Use server-side code to make API requests
- Never commit API keys to version control
- Rotate keys if you suspect they’ve been compromised
Environment Variables
Authentication Errors
If your API key is invalid or missing, you’ll receive a401 Unauthorized response:
Common Issues
| Error | Cause | Solution |
|---|---|---|
| Missing API key | No x-api-key header | Add the header to your request |
| Invalid API key | Incorrect key value | Check for typos or use the correct key |
| Expired key | Key has been revoked | Generate a new key in your dashboard |