Authentication for API access

Most of our API endpoints require you to authenticate so that you can perform a variety of tasks. This article explains how to authenticate to access our API functionality.

Basic authentication

Our API supports basic authentication, which requires providing a username and password when you make an API request.

curl -u username:password https://yourcompany.com/api

Token authentication

Our API also supports token authentication. You need to generate an API token on your account, and then provide it in the header of your API calls.

curl -H "Authorization: Api-Token auth_token" https://yourcompany.com/api

Generating an API token

To generate an API token, follow these steps:

  1. Go to your account settings.
  2. Select API tokens.
  3. Click on create new token.
  4. Give the token a name and click generate.
Note: Be sure to copy and save your new API token. You won’t be able to see it again.

Token scopes

When you generate a token, you have the option to choose its scope. This determines which parts of the API the token can access. Choose your scope carefully based on your needs.

Read-only scope

The read-only scope allows the token to access and read most data, but it cannot change anything.

Write scope

The write scope allows the token to read and write data, allowing it to perform changes and deletions.

We recommend rotating your API tokens periodically to ensure a safe and secure API environment. If you have questions or need assistance, our support team is here to help.

Was this helpful?