Learn the roles of the API key and access token, how to send them, and how to interpret auth errors.
Deeply API uses both an API Key and an Access Token.
Those credentials serve different purposes, so using the right one matters.
API Key: long-lived credential used only for access-token issuanceAccess Token: Bearer token used for normal API requestsDo not send the API key to general endpoints. Use the access token instead.
Include your access token in the Authorization header of all normal API requests using the Bearer token format:
Authorization: Bearer YOUR_ACCESS_TOKENcurl -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.
If the access token is missing or expired, call the Reissue Token endpoint.
That request must use Authorization: Bearer YOUR_API_KEY.
If authorization fails, you'll receive one of these responses:
{
"detail": {
"message": "Authentication token expired. Please reissue a new token to renew your session."
}
}const response = await fetch('http://{{EDGE_IP}}:8100/api/v1/events', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();