Create a System API token
Create a System API token for an external system, restrict what it can reach and copy its token and secret.
Create a System API token when an external system needs to call Servicely without a user’s password. You end with a token, and a shared secret for HMAC validation, that the external system sends with each request.
Before you begin
- You need the
api_token_administratorrole, oradministrator. - Create the user the token will run as, with only the roles the integration needs.
- Choose a validation type. Authentication methods for inbound integrations compares them.
- Know which entry points and paths the external system calls.
Steps
-
Go to Administration → Integration → System API tokens and select New.
-
Enter a Name that identifies the external system.
-
Set Validation type. The table below lists the values.
-
For an HMAC validation type, check Hash method. It defaults to SHA256. For HMAC header validation, enter the headers to hash in Header key, separated by commas. It defaults to
Date. -
Select the Impersonate user. Every request made with the token runs as this user.
-
In Allowed Scopes, select the entry points the token may use, for example REST API (v1). Leave it empty to allow every entry point.
-
In URL Allowed Paths, enter the paths the token may call, separated by commas. For example, enter
/controller/ControllerNameto allow one controller. Leave it empty to allow every path the scopes and the user permit. -
Select Generate Token. Servicely shows the token and the shared secret.
-
Copy both values and store them in the external system’s secret store. Servicely does not show them again.
| Validation type | Use when |
|---|---|
| None (Bearer token in Header) | The caller can send headers and needs only a token |
| HMAC header validation | The caller can hash headers with a shared secret |
| HMAC body validation | The caller can sign the method, body, content type, date and path |
| None (Bearer token in URL) | The caller cannot set headers. Inactive until you enable it. |
Result
The token is active and its record shows the Token prefix. Each request updates Last authentication and Last authentication address, so you can see when and from where the token was last used. To stop the integration, clear Active. If the token or secret is lost, create a new token and update the external system.