Skip to main content
The Noyax API uses JWT access tokens. You get a token from the Noyax auth service with your API key and send it in the Authorization header of every request.

Flow

Getting a token

string
required
Your organization name, issued by Noyax.
string
required
Your API key.
If the credentials are wrong or your API license has expired, the auth service returns 401 (Invalid API credentials., ApiKey expired.).

Refreshing a token

Access tokens are short-lived (a matter of minutes). When a token expires, the API responds with:
Get a new pair with the old access token and the refresh token:
The response has the same shape as the login response.
Every login and refresh issues a new refresh token and invalidates the previous one. An API key has only one valid refresh token at a time. If several servers or processes use the same key, manage the token in one place and share it. Otherwise a refresh in one process invalidates the refresh token of the others.
  • Keep the token in memory or in a shared cache. Do not log in for every request.
  • Refresh shortly before the token’s exp claim, or refresh once when you get 401 invalid_token and retry the request.
  • If refreshing fails (Invalid refresh token.), log in again.

Token contents

The access token carries the settings of your API key, captured when the token is issued:
If the permissions or daily limit of your key change, the change takes effect when you get a new token.