Issue a token for another system

Give another system, such as an accounting package, a website or your own application, access to Odigos. In Sentinel you give that system its own token, with only the permissions it needs.

Before you begin

  • An API on the data structure the system uses. To learn how to create one, see Fetch your first records through the API.
  • A role that allows that API. When you create an API, Orchestra offers such an integration role straight away. You can also choose or create a role under Roles in Sentinel.
  • An account that is allowed to issue tokens in Sentinel.

Issue a token

  1. Open Sentinel and go to API tokens. The tokens already issued are listed, each with its roles, when it was last used and the last day it works.
  2. Click Issue token.
  3. Under Roles, select the role the system needs. A token without a role can't do anything.
  4. In Label (required), enter a name you will recognise, such as the name of the system.
  5. If you want the token to stop working, choose the last day it works in Valid up to and including (optional). The token works up to and including that day, until midnight in the time zone of your organisation. Without a date, it keeps working until you revoke it.
  6. Click Issue. Token created appears with the token. Click Copy token and add it to the other system.

The system sends the token with every call in the header Authorization: Bearer odg_<id>_<geheim>.

The Issue token window in Sentinel. The duinzicht-financien role is selected; below it are the Label (required) and Expiry date (optional) fields and the Issue button.

You only see the token once
Copy it straight away. Odigos doesn't store the secret anywhere, so you can't retrieve it later. The list only shows the token ID for each token: odg_ followed by twenty characters. That isn't the secret.

Check what a token can do

For a token, click Access. Effective access shows what the token can do now, based on its roles.

Replace or revoke a token

  • Rotate gives you a new token with the same roles. The old token keeps working until you revoke it. So add the new token to the other system first, then revoke the old one.
  • Revoke turns a token off. A call with that token then gets a 401.

You can't change the roles of an existing token. If the system needs different permissions, issue a new token and revoke the old one.

A key for a person

If the access belongs to a person rather than a system, create an API key on their account. An account in Sentinel has an API keys section. Click New key there. That key can do what the account can do. If you want it to stop working, choose the last day it works in Valid up to and including (optional). The list then shows up to and including and that date. For another system, use a token, so you manage its permissions separately from any person.

If it doesn't work

  • 401: the token is missing, incorrect, expired or revoked. Check that the system sends the Authorization header, with Bearer in front.
  • 403: the token isn't allowed to use this API or this operation. The message in errors names the missing permission. Issue a token with a role that does allow it.
  • Your system can't send a token: see Exchange events between Odigos and your system for how this works through Digidux, your implementation partner.

See also