Authenticatie
Generate a developer token
To generate a developer token, you need to be logged in as an administrator. Go to the "Settings" page and click on the "Generate Token" button. then,you can get the client ID and client secret from the "API Tokens" page.
Get Access Token and Refresh Token
To get an access token and refresh token, you need to make a POST request to the /auth/token endpoint with the following parameters:
grant_type: set tocodeclient_id: the client ID you got from the "API Tokens" pageclient_secret: the client secret you got from the "API Tokens" pagescope: set toapicode: the code you got from the/auth/authorizeendpoint
The response will contain the access token and refresh token. The access token is valid for 1 month, and the refresh token is valid for 1 years. You can use the refresh token to get a new access token.
Get the exchange code
- endpoint:
/auth/authorize - method: GET
| Parameter | Type | Required | Description |
|---|---|---|---|
| client_id | string | true | The client ID you got from the "API Tokens" page |
| redirect_uri | string | true | The redirect URI you set when you registered your application |
| response_type | string | true | Set to code |
| scope | string | true | Set to api |
| redirect_uri | string | true | The redirect URI you set when you registered your application |
The response will contain the exchange code. You can use this code to get an access token and refresh token.
Get Access Token and Refresh Token
- endpoint:
/auth/token - method: POST
| Parameter | Type | Required | Description |
|---|---|---|---|
| grant_type | string | true | Set to code |
| client_id | string | true | The client ID you got from the "API Tokens" page |
| client_secret | string | true | The client secret you got from the "API Tokens" page |
| code | string | true | The exchange code you got from the /auth/authorize endpoint |
| redirect_uri | string | true | The redirect URI you set when you registered your application |
how to use the access token
To use the access token, you need to add it to the Authorization header of your request. The value of the header should be Bearer <access_token>.