API Authentication
All protected endpoints require authentication. This page covers the authentication methods available.Authentication Methods
| Method | Header | Use Case |
|---|---|---|
| API Key | Authorization: Bearer olive_live_xxx | Third-party integrations |
| JWT | Authorization: Bearer eyJ... | Admin dashboard |
| Service Auth | X-Service-Auth: HMAC timestamp:signature | Internal services |
API Key Authentication
Most common for external integrations.Request Format
API Key Prefixes
| Prefix | Environment |
|---|---|
olive_live_ | Production |
olive_test_ | Staging/Testing |
JWT Authentication
For admin operations and protected dashboard endpoints.Obtaining a Token
Using the Token
Error Responses
401 Unauthorized
Missing or invalid authentication:403 Forbidden
Authenticated but lacking permission:Best Practices
Secure Storage
Secure Storage
Store API keys securely; never expose in client-side code or version control.
Key Rotation
Key Rotation
Rotate API keys periodically and immediately after any suspected compromise.
Minimum Scope
Minimum Scope
Request only the scopes needed for your integration.
HTTPS Only
HTTPS Only
Always use HTTPS in production to protect credentials in transit.