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.
Generate an API key
Section titled “Generate an API key”API keys are managed from the Orion Data application:
Open Account Settings
Sign in to Orion Data and navigate to Account Settings.
Generate an API key
Use the API key controls in Account Settings to generate a new key.
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.
Exchange the key for a bearer token
Section titled “Exchange the key for a bearer token”Call the Generate a bearer token endpoint with your API key as a query parameter:
curl -X GET "https://api.oriondata.io/api/token?apiKey={apiKey}"The response contains a JWT bearer token:
{ "token": "your_generated_token_here"}Use the bearer token
Section titled “Use the bearer token”Include the bearer token in the Authorization header of every authenticated request:
Authorization: Bearer {token}For example:
curl -X GET "https://api.oriondata.io/api/UserDevices" \ -H "Authorization: Bearer $TOKEN"