Skip to content
Orion Docs
Talk to usNeed help?Get Started

API documentation

Authenticate API requests

Orion Data API v1.3 · Latest

How to generate an API key in Orion Data, exchange it for a JWT bearer token, and authenticate requests to the Orion Data API.

The Orion Data API uses API keys to identify the calling user and JWT bearer tokens to authenticate individual requests. Generate an API key once from the Orion Data application, then exchange it for a short-lived bearer token whenever you start a new session.

API keys are managed from the Orion Data application:

  1. Open Account Settings

    Sign in to Orion Data and navigate to Account Settings.

  2. Generate an API key

    Use the API key controls in Account Settings to generate a new key.

  3. Store the key securely

    Treat the API key like a password. Anyone with the key can request a bearer token on behalf of your user.

Call the Generate a bearer token endpoint with your API key as a query parameter:

Terminal window
curl -X GET "https://api.oriondata.io/api/token?apiKey={apiKey}"

The response contains a JWT bearer token:

{
"token": "your_generated_token_here"
}

Include the bearer token in the Authorization header of every authenticated request:

Authorization: Bearer {token}

For example:

Terminal window
curl -X GET "https://api.oriondata.io/api/UserDevices" \
-H "Authorization: Bearer $TOKEN"