Authorization

Learn how to authorize your requests to the Deeply API using Bearer token authorization with API keys.

All API requests to Deeply must be authorized using Bearer token authorization with your access token.

Using the Access Token

Include your access token in the Authorization header of all API requests using the Bearer token format:

Authorization: Bearer YOUR_ACCESS_TOKEN

Example Request

curl -X GET "https://openapi.deeplyinc.com/api/v1/events"
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

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.

You can reissue your access token with API Key(refresh token) using the Reissue Token API.

{
  "detail": {
    "message": "Authentication token expired. Please reissue a new token to renew your session."
  }
}

Request Sample With Access Token

const response = await fetch('https://openapi.deeplyinc.com/v1/events', {
  method: 'GET',
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }
});

const data = await response.json();