API tokens
This article explains how to create and work with API Tokens.
Create API Token
Open Account Settings page from the user menu in the bottom left corner of the sidebar.
- Click on
User menu
in the bottom left corner of the sidebar, - Select
Account Settings
from the dropdown
Follow the steps below to create API Token
- Click on
Tokens
tab in theAccount Settings
page - Click on
Add New API Token
- Enter the name for the API Token
- Click on
Save
button to save the changes - Copy the API Token by clicking on
Copy
button displayed underActions
menu - Use the API Token in the services that require it to authenticate as
xc-token
in the headers.
{
"headers": {
"xc-token": "Copied API token here under quotes"
}
}
API Token created will get added to the list. Copy API token by clicking on Copy
button displayed under Actions
menu
Delete API Token
Note that, all the services using the API Token will stop working once the API Token is deleted.
Open Account Settings page from the user menu in the bottom left corner of the sidebar.
- Click on
User menu
in the bottom left corner of the sidebar, - Select
Account Settings
from the dropdown
- Click on
Tokens
tab in theAccount Settings
page - From the
Actions
menu, click onDelete
button associated with the API Token to be deleted
API Token Access with SSO-Enabled Workspaces
If a workspace is configured to enforce Single Sign-On (SSO), API access to that workspace is restricted to tokens that are created after authenticating via SSO.
To access an SSO-enforced workspace via API, users must:
- Sign in using SSO.
- Generate a new API token from their authenticated session.
For ease of identification, tokens created after SSO is enabled will have a badge indicating they were generated through SSO authentication.
What Happens When SSO is Disabled?
If SSO is later disabled for a workspace:
- API tokens that were created via SSO authentication will continue to work as long as the user is still active and has the required permissions.
- Tokens created prior to enabling SSO will continue to function & can now access the workspace without SSO authentication.
- No tokens are automatically revoked when SSO is disabled.