| Method | Use Case | Header Format |
|---|---|---|
| JWT Token | Dashboard, user operations | Authorization: Bearer {token} |
| API Key | Edge agents | X-API-Key: {key} |
JWT Token Authentication
JWT tokens are used for all user-facing operations: managing agents, viewing dashboards, configuring metrics, and accessing billing information.Obtaining a Token
Tokens are returned when you register or log in:Using the Token
Include the token in theAuthorization header for all authenticated requests:
Token Expiration
- Tokens expire after 24 hours by default
- The
expires_infield in the response indicates seconds until expiration - When a token expires, users must log in again to obtain a new token
Password Reset
If you forget your password:1
Request Reset
2
Reset Password
Use the token from the email to set a new password:
API Key Authentication
API keys are designed for edge agents. They provide long-lived, scoped credentials that don’t require user interaction to refresh.Creating an API Key
Use a JWT token to create API keys:Available Permissions
| Permission | Description |
|---|---|
edge:register | Register new edge agents |
edge:heartbeat | Send heartbeat signals |
edge:metrics | Push metrics to the platform |
edge:stream | Stream logs to the cloud |
Using API Keys
Edge agents include the API key in theX-API-Key header:
Managing API Keys
List Keys
Revoke Key
Security Best Practices
Rotate API Keys Regularly
Rotate API Keys Regularly
Create new API keys periodically and revoke old ones. This limits exposure if a key is compromised.
Use Minimal Permissions
Use Minimal Permissions
Only grant the permissions each edge agent actually needs. If an agent only sends heartbeats and metrics, don’t include
edge:stream.Secure Token Storage
Secure Token Storage
Never commit tokens or API keys to version control. Use environment variables or secret management systems.
Monitor API Key Usage
Monitor API Key Usage
Regularly review your API keys and revoke any that are no longer in use.
Error Responses
401 Unauthorized
Returned when authentication fails:- Token has expired
- Token is malformed
- API key has been revoked
- Missing authentication header
403 Forbidden
Returned when authenticated but lacking permission:- API key missing required permission
- User role doesn’t allow the operation
- Accessing resources from another organization