Skip to main content

Authorization

To make secure calls to the THEOlive REST API, both authentication and authorization are required. THEOlive uses token–secret pairs to authorize API requests and ensure secure access.

1. Getting a token-secret pair

To generate a token–secret pair, you must first have an account on the THEOlive management console.

  1. Navigate to the Developers section and click on "Tokens".
  2. Click the "Generate Token" button.
  3. Enter a name for your token.
  4. Click "Generate" to create the token–secret pair.

This will open a pop-up displaying your token "key" and its corresponding secret.

Please store the secret

Make sure to securely store the secret, as it will only be shown once. THEOlive stores a hashed version of the secret, meaning it cannot be recovered afterward.

Once you close the pop-up window, the new token will be visible in your list of active tokens.

If you forget your secret or if it gets exposed, you can easily regenerate a new token–secret pair at any time.

To revoke a token, click the arrow icon under the "Actions" column and the token will be moved to the list of revoked tokens after confirmation.

2. Using the token-secret pair with Basic Authentication

THEOlive uses Basic Authentication for API requests. To authenticate, include your token-secret pair (base64-encoded) in the 'Authorization' header, prepended with the word 'Basic'.

Here’s an example of how to set up the header:

  1. Combine your token and secret in the format token:secret. Example: my-token:my-secret

  2. Base64 encode the combined value. Example: bXktdG9rZW46bXktc2VjcmV0

  3. Include the encoded string in the Authorization header, prefixed with the word Basic. Example header: Authorization: Basic bXktdG9rZW46bXktc2VjcmV0

  4. The final Authorization header should look like this: Authorization: Basic bXktdG9rZW46bXktc2VjcmV0

You’re now ready to make authenticated requests to the THEOlive API.