Authorizing API Requests
All requests to the Anon API require authentication using an API key. This page serves as a centralized reference for all authentication-related information.API Key Management
Creating an API Key
API keys can only be created by Anon admins.
- Navigate directly to Anon Dashboard: API Keys. Ensure you are logged in using your work email.
- Click the Create New Key button
- Enter a description for your key (e.g., “Production Server”, “Development Environment”)
- Click Generate Key
- Copy and securely store your API key
Using Your API Key
Include your API key in theAuthorization HTTP header for all API requests:
API Key Best Practices
- Never share your API key: In publicly accessible areas such as GitHub or client-side code. Make requests to Anon server-side.
- Separate Development from Production: Create different keys for different environments (development, production).
- Use secrets or environment variables: To store API keys in your applications.
We recommend rotating your API keys at least every 90 days as a security best practice.
Revoking API Keys
If an API key is no longer needed:- Log in to your Anon Dashboard
- Navigate to Settings > API Keys
- Find the key you want to revoke
- Click Revoke Key
- Confirm the action
Environments and Base URLs
Anon provides a single environment for production, with an API endpoint and dashboard:| Environment | Details |
|---|---|
| Production | • Dashboard: dashboard.anon.com • API Base URL: https://worker.anon.com• Use for live applications • API keys start with anon_ and are required for production endpoints |
API Error Handling
The API returns standard HTTP status codes to indicate success or failure:2xx- Success4xx- Client error (e.g., invalid parameters, authentication error)5xx- Server error