API tokens
Using an API token, a third-party application can call the Centreon API to perform actions in Centreon (webhooks).
A token is linked to one Centreon user and is valid only for a certain period of time. API calls will be executed according to the rights assigned to this user. A specific user can have several tokens.
Who can create API tokens?​
Users with an Administrator role can access the Administration > API tokens page and can:
- create tokens for themselves.
- see tokens created by other users.
- create tokens for other users, and can disable or delete them.
Creating an API token​
- Go to Administration > API Tokens.
- Click Add. A pop-up window appears.
- Fill in the required fields and then click Generate new token. A Token field appears in the window. You can click the eye icon to display the token if you want.
- Copy the token using the "copy" button to the right of the field. Store the token carefully: you will not be able to display it a second time.
- Click Close.
Managing API tokens​
The list of tokens shows the status of each token in the far left column (enabled, valid but disabled, expired). The date when the token was last used is also shown.
Users with the Administrator role can:
- Disable a valid API token using the Enabled/Disabled switch to the right of the line. The token can still be reenabled later.
- Delete a token using the Delete button.