Archived Version: v2025.08
You are viewing an archived reference version.
Authorization
Learn the roles of the API key and access token, how to send them, and how to interpret auth errors.
Last updated: January 1, 1980
Deeply API uses both an API Key and an Access Token.
Those credentials serve different purposes, so using the right one matters.
Credential Roles
API Key: long-lived credential used only for access-token issuanceAccess Token: Bearer token used for normal API requests
Do not send the API key to general endpoints. Use the access token instead.
Using The Access Token
Include your access token in the Authorization header of all normal API requests using the Bearer token format:
Authorization: Bearer YOUR_ACCESS_TOKENExample Request
curl -X GET "http://{{EDGE_IP}}:8100/api/v1/events" -H "Authorization: Bearer YOUR_ACCESS_TOKEN"This page uses the local default host shown in Getting Started. If you want to validate the same request against the public HTTPS environment, replace the host with https://openapi.deeplyinc.com.
When You Need To Issue An Access Token
If the access token is missing or expired, call the Reissue Token endpoint.
That request must use Authorization: Bearer YOUR_API_KEY.
Error Responses
If authorization fails, you'll receive one of these responses:
- 401: Unauthorized - Expired Token
- You will get this response when your access token is expired. Please reissue a new token to renew your session.
- 401: Unauthorized - Invalid Key
- You will get this response when the access token is invalid. Please check your token and try again.
- 403: Forbidden - No Key
- You will get this response when the request does not contain an access token. Please provide a valid access token to continue.
{
"detail": {
"message": "Authentication token expired. Please reissue a new token to renew your session."
}
}Request Sample With Access Token
const response = await fetch('http://{{EDGE_IP}}:8100/api/v1/events', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();