Authentication
Authenticate every request with a Bearer API key, and recognise the errors when it goes wrong.
The Billy API uses Bearer Token authentication. Each request must include an Authorization header with your API key.
API Key Format
Bearer billy:o:<organization_id>:<api_key>billy:o:: Required prefix<organization_id>: Your Billy organization identifier<api_key>: Your secret API key
Header Example
Authorization: Bearer billy:o:1234567891234567:xxxxxxxxxxxxxxxxxCommon Authentication Errors
| Code | Message | Explanation |
|---|---|---|
| 400 | "API key required in AUTHORIZATION header" | The Authorization header is missing |
| 400 | "Invalid API key format" | The key format is incorrect |
| 403 | "API key not found" | The key does not exist or has been deleted |
| 403 | "API key revoked" | The key has been revoked |