API Authentication
All API requests must be authenticated using Basic Authentication with your API credentials.
Generating API Keys
- Navigate to Settings in your Fabius account
- Click on API Keys in the sidebar
- Click Create API Key
- Give your key a descriptive name (e.g., “Production Integration”)
- Save the generated credentials securely
API credentials are shown only once when created. Store them securely and never share them publicly.
Authentication Method
The Fabius API uses HTTP Basic Authentication. Include your credentials in the Authorization header:
Authorization: Basic base64(clientId:clientSecret)
Examples
Using cURL
curl -X GET https://api.fabius.io/external/v1/documents \
-H "Authorization: Basic $(echo -n 'your-client-id:your-client-secret' | base64)"
Using JavaScript
const clientId = 'your-client-id';
const clientSecret = 'your-client-secret';
const credentials = Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
fetch('https://api.fabius.io/external/v1/documents', {
headers: {
'Authorization': `Basic ${credentials}`
}
});
Using Python
import requests
from requests.auth import HTTPBasicAuth
response = requests.get(
'https://api.fabius.io/external/v1/documents',
auth=HTTPBasicAuth('your-client-id', 'your-client-secret')
)
Authentication Details
Important Notes
- The Authorization header must use the exact format:
Basic <base64-encoded-credentials>
- The scheme “Basic” is case-sensitive (lowercase “basic” will not work)
- Extra spaces in the Authorization header are automatically normalized
- Deleted API keys cannot be used for authentication
Security Best Practices
- Never expose credentials: Keep API keys out of client-side code and version control
- Use environment variables: Store credentials in environment variables
- Rotate keys regularly: Generate new keys periodically
- Use HTTPS: Always use HTTPS for API requests
- Limit key scope: Create separate keys for different environments
Managing API Keys
You can manage your API keys from the Settings page:
- View active keys: See all active API keys and their creation dates
- Revoke keys: Immediately disable compromised or unused keys
- Track usage: Monitor which keys are being used (coming soon)