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:
- Go to your account settings.
- Select API tokens.
- Click on create new token.
- Give the token a name and click generate.
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.