Authentication
Learn how to authenticate with the GRANTED External API using API keys.
API Key Authentication
The GRANTED External API uses API key authentication. Include your API key in the Authorization header of every request.
Header Format
Authorization: Bearer your_api_key_hereExample Request
cURL
curl -H "Authorization: Bearer gka_1234567890abcdef" \
https://api.granted.com/external/v1/grantsJavaScript
const apiKey = 'gka_1234567890abcdef';
const response = await fetch('https://api.granted.com/external/v1/grants', {
headers: {
'Authorization': `Bearer ${apiKey}`
}
});API Key Management
API keys can be managed through your partner dashboard. Each key has:
- Configurable scopes (grants:read, subscription:read, etc.)
- Environment designation (development, staging, production)
- Optional expiration dates
- IP whitelisting capabilities
Security Best Practices
- Never expose API keys in client-side code
- Use environment variables to store keys
- Rotate keys regularly
- Use different keys for different environments
- Monitor key usage through the dashboard