Skip to content

Authentication

Authenticate every request with an API key from your Nuvio company.

View as Markdown

The Nuvio API uses API keys to authenticate requests. Send the key in the Authorization header as a bearer token:

Authorization: Bearer <api_key>

A key belongs to the Nuvio company it was created in, not to a person: every request made with it reads or writes that company's records. Each key carries scopes, and an endpoint answers only a key that has its scope.

Keep your keys secret. Don't put them in code that runs in a browser or an app, or in a public repository; read them from an environment variable on your server instead. The examples here use NUVIO_API_TOKEN.

Create an API key

Owners and Company Admins of a company can create its keys in Nuvio:

  1. In Nuvio, open Settings › Company › Developers.
  2. Under API Keys, choose Add New API Key.
  3. Give the key a name that says where it's used, such as the app or service that will call the API.
  4. Select the scopes it needs (see below), then choose Save.
  5. Copy the key and store it somewhere safe. Nuvio shows it only once: after you close the window, it can't be shown again.

To revoke a key, choose Delete next to it on the same page. Requests made with it are refused from then on. If a key may have leaked, delete it and create a new one.

Scopes

Give each key only the scopes its integration needs. A request with a key that lacks the endpoint's scope gets 403 with error 1001.

When authentication fails

401
No usable Authorization: Bearer <api_key> header. Error code 1002.
403
The key is unknown or deleted, or lacks the scope the endpoint needs. Error code 1001.