Authentication
Learn how to authenticate with the DineFlow.ai API
API Authentication
All DineFlow.ai API requests require authentication using API keys.
Getting Your API Key
- Log in to your DineFlow.ai dashboard
- Navigate to Settings → API Keys
- Click Generate New Key
- Copy and store your API key securely
Using Your API Key
Include your API key in the Authorization header of all requests:
curl https://api.dineflow.ai/v1/status \
-H "Authorization: Bearer YOUR_API_KEY"
JavaScript Example
const response = await fetch('https://api.dineflow.ai/v1/status', {
headers: {
'Authorization': `Bearer ${process.env.DINEFLOW_API_KEY}`
}
});
Python Example
import requests
headers = {
'Authorization': f'Bearer {os.getenv("DINEFLOW_API_KEY")}'
}
response = requests.get(
'https://api.dineflow.ai/v1/status',
headers=headers
)
Rate Limits
- Free Tier: 1,000 requests per day
- Pro Tier: 10,000 requests per day
- Enterprise: Custom limits
Error Responses
Invalid or missing API keys return a 401 Unauthorized status:
{
"error": "Unauthorized",
"message": "Invalid API key"
}