Authentication
All API requests require authentication using an API key. Include your API key in the request header to authenticate your requests.
API Key Authentication
Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEY
Log in to your LEXOH dashboard and navigate to Settings → API Keys to generate your authentication token. Keep your API key secure and never expose it in client-side code.
Example Request
Here's an example of an authenticated API request using cURL:
curl -X GET "https://api.lexoh.com/v1/devices" \ -H "Authorization: Bearer YOUR_API_KEY"
Response Format
Successful authentication will return the requested data. Failed authentication returns a 401 Unauthorized status code:
{ "error": "Unauthorized", "message": "Invalid or missing API key" }
- Never commit API keys to version control
- Use environment variables to store API keys
- Rotate API keys regularly
- Use different API keys for development and production
- Revoke compromised keys immediately
Rate Limiting
API requests are rate-limited to ensure fair usage and system stability. Rate limits are per API key:
Ready to Make Your First Request?
Learn how to manage devices using our API
Continue to Devices API →