Personal Access Tokens
Personal Access Tokens
Personal access tokens provide a flexible and reliable method for authenticating platform API requests. They can replace session-based authentication and allow integrations to use specifically assigned permissions without exposing the account login and password.
Overview
Personal access tokens are an alternative to the default session-based API authentication method. A token can be created for a particular integration, limited to selected API operations, assigned an expiration date, and revoked whenever access is no longer required.
Recommended for API integrations
Tokens are particularly useful for automation scripts and accounts protected by two-factor authentication because they avoid the additional requests required to create and verify a temporary session.
Benefits of Access Tokens
Manage Access Tokens
Open the account menu in the upper-right corner of the dashboard and click Settings.
Select the Access Tokens tab to view all personal access tokens associated with the account.
The tools panel provides the following actions:
Generate an Access Token
Click Generate in the Access Tokens tools panel.
Configure the new token using the available fields:
Click Generate. Enter the current account password in the confirmation window and click Continue.
The platform displays the newly generated token value. Click Download or Copy, save the token securely, select I’ve saved the data, and click Done.
The token is shown only once
The secret token value cannot be viewed again after this window is closed. Store it in a secure password manager or another protected location. Do not place it in public repositories, documentation, screenshots, or client-side code.
Edit or Copy an Access Token
Edit a Token
Select an existing token and click Edit. Update its description, expiration date, or API permissions, and confirm the changes with the account password.
Copy a Token
Select a token and click Copy to create a separate token based on the existing configuration. Review the copied settings, make any required changes, and generate the new token.
Use separate tokens for separate integrations
Creating an individual token for each service makes permission management, auditing, rotation, and revocation easier.
Regenerate an Access Token
When a token value is lost, forgotten, or suspected to be exposed, select it and click Edit. In the Edit Access Token window, click the regeneration link and apply the change.
Update connected integrations
Regeneration immediately invalidates the previous token value. Every application, script, or automation using the old token must be updated with the new value.
Remove an Access Token
Select the token that is no longer required. Use Ctrl or Shift to select multiple entries when needed.
Click Remove in the tools panel.
Confirm the removal in the pop-up window and enter the account password to complete the operation.
Removal is immediate
Applications using a removed token can no longer authenticate. Verify that the token is not required by an active integration before deleting it.
Use an Access Token
Use the token value in the session parameter of the required platform API method. Unlike session-based authentication, a separate request for generating a temporary session is not required.
For example, the following REST request stops an environment:
https://app.${platformDomain}/1.0/environment/control/rest/stopenv?envName=${envName}&session=${token}
Replace the placeholders as follows:
A successful operation returns “result”:0. A non-zero result value indicates an error. After a successful request, return to the dashboard to verify that the target environment has stopped.
Expected result
The integration can call only the API methods permitted by the token without exposing the account password or creating a temporary authentication session.
