Overview
The FleetView API uses API keys for authentication. All API requests must include a valid API key in the Authorization header. API keys are tied to your account and provide access to your fleet data based on your subscription plan.
Security Best Practices
- • Keep your API keys secure and never share them publicly
- • Use different API keys for different environments (development, production)
- • Rotate your API keys regularly
- • Monitor API key usage in your dashboard
Getting Your API Key
To get your API key, follow these steps:
- 1Log in to your FleetView dashboard
Access your account at fleetview.pro/login
- 2Navigate to API Keys
Go to Settings → API Keys (requires login to access)
- 3Create a new API key
Click "Generate New Key" and give it a descriptive name
- 4Copy and secure your key
Save the API key immediately - you won't be able to see it again
Important
API keys are only shown once when created. Make sure to copy and store them securely before closing the dialog.
Using API Keys
Include your API key in the Authorization header of every API request using the Bearer token format:
HTTP Header
Authorization: Bearer YOUR_API_KEY_HEREExample Request
curl -X GET "https://api.fleetview.pro/v1/vehicles" \
-H "Authorization: Bearer flv_live_1234567890abcdef..." \
-H "Content-Type: application/json"JavaScript Example
const response = await fetch('https://api.fleetview.pro/v1/vehicles', {
method: 'GET',
headers: {
'Authorization': 'Bearer flv_live_1234567890abcdef...',
'Content-Type': 'application/json'
}
});
const data = await response.json();Rate Limits
API requests are rate limited based on your subscription plan to ensure fair usage and system stability.
Free Plan
Pro Plan
Enterprise
Rate Limit Headers
Every API response includes headers that show your current rate limit status:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200Error Handling
The API returns standard HTTP status codes and detailed error messages to help you troubleshoot issues.
Unauthorized
Invalid or missing API key
{
"error": {
"code": "unauthorized",
"message": "Invalid API key provided"
}
}Rate Limited
Too many requests - rate limit exceeded
{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds."
}
}Forbidden
API key doesn't have permission for this resource
{
"error": {
"code": "insufficient_permissions",
"message": "Your API key doesn't have access to this resource"
}
}Testing Your API Key
Use this simple test to verify your API key is working correctly:
Test API Key
curl -X GET "https://api.fleetview.pro/v1/account" \
-H "Authorization: Bearer YOUR_API_KEY_HERE"
# Expected response:
{
"success": true,
"data": {
"account_id": "acc_1234567890",
"company_name": "Your Company",
"plan": "pro",
"api_version": "v1"
}
}Need Help with API Integration?
Our developer support team can help you get started with the FleetView API.