Misc
Authentication
Learn how to authenticate your requests to the Cludz API.
Cludz API uses API Key Token authentication to secure access to its endpoints. You must include your API key in the header of every request.
Authentication Header
To authenticate, add the X-API-Key header to your HTTP requests with the value <YOUR_API_KEY>.
X-API-Key: sk_live_...
Your API Key acts as a password. Do not share it or commit it to public repositories.
Obtaining an API Key
- Log in to the Cludz Developer Dashboard.
- Navigate to the API Keys section.
- Click *Create New Key
- Input key name.
- Copy the key.
Authentication Errors
If authentication fails, the API will return one of the following error codes:
| Status Code | Description | Cause |
|---|---|---|
401 Unauthorized | Invalid or missing API key. | You forgot the header or the key is incorrect. |
403 Forbidden | Key lacks permissions. | The key is valid but doesn't have access to this resource (e.g. quota exceeded). |
Security Best Practices
- Rotate Keys: Regularly regenerate your API keys if you suspect they have been compromised.
- Environment Variables: extensive usage of environment variables to store your API keys is recommended.
- Server-Side Only: Do not use your API key in client-side code (browsers), as it can be easily exposed. Proxy requests through your backend.
