API Keys
All API requests require authentication using an API key. You can generate API keys from your Affonso Dashboard.Using Your API Key
Include your API key in theAuthorization header as a Bearer token:
Key Formats
Permissions
API keys can have different permission levels:Error Responses
Example Error
Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys should only be used in server-side code. Never include them in JavaScript that runs in the browser.
Use environment variables
Use environment variables
Store your API keys in environment variables, not in your codebase.
Rotate keys regularly
Rotate keys regularly
Regenerate your API keys periodically and after any potential security incident.
Use minimal permissions
Use minimal permissions
Only grant the permissions your integration actually needs.
