Authentication & Security
Secure your API connections with proper authentication methods.
API Keys
Generating API Keys
- Navigate to your Yellow.ai dashboard
- Go to Settings > API Keys
- Click "Generate New Key"
- Copy and securely store your key
Using API Keys
Include your API key in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.yellow.ai/v1/endpoint
OAuth 2.0
For enterprise applications, we recommend using OAuth 2.0:
Authorization Flow
-
Authorization Request
GET /oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=YOUR_REDIRECT_URI
-
Token Exchange
POST /oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=AUTHORIZATION_CODE&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
Security Best Practices
- Never expose API keys in client-side code
- Use environment variables for sensitive data
- Implement proper token refresh mechanisms
- Monitor API usage and set up alerts