Personal API tokens
Create personal API tokens and choose which workspaces they can access. Roll or revoke them when needed.
Choose the right API credential
A personal API token acts as you, with the access your membership gives you. It stops working for a workspace when your membership ends.
Use a personal API token when
- A script or tool runs on your behalf.
- Actions should be attributed to you.
Use something else when
- Shared workspace automation: use a workspace API key from Service accounts. The key stops working if the person who created it leaves the workspace.
Create a personal API token
- 1.
Open API tokens
Open the account menu, select Account, then Tools & tokens, and select New token.
- 2.
Name the owner and purpose
Use a name that identifies the script, device, or integration. Token names can be up to 100 characters.
- 3.
Set an expiration
Choose the shortest useful lifetime. A custom expiration can be up to 365 days.
- 4.
Choose access
Keep the token personal, select specific workspaces, or allow current and future workspaces subject to each workspace policy. With one workspace selected, you can limit the token to selected projects.
- 5.
Choose permissions
Start with a preset or select individual read and write permissions. Grant only what the client needs.
- 6.
Review
Check the name, expiration, access, and permissions. Select Edit on any row to change it before you create the token.
- 7.
Save the secret
Create the token, then copy it to a password manager or secret manager or download the text file before dismissing the reveal.
Limit where the token can act
Under Workspace access, choose Personal, Specific, or All.
- Personal
- Allows profile and identity endpoints, without workspace data.
- Specific
- Allows up to 100 selected current workspaces. Joining another workspace does not add it to the token.
- All
- Allows current and future workspace memberships. This mode requires an expiration and an explicit confirmation.
Use and store the secret
Send the token as Authorization: Bearer <token> on REST API requests. Keep it in a secret manager or protected environment variable rather than a command history, shared document, or source file.
Project Feed shows the full secret only after creation or rotation. If it is lost, rotate the token; it cannot be revealed again.
Change, rotate, or revoke a token
For an unexpected 401, check whether the token expired, was revoked, or was copied incorrectly. For 403, check its permissions, workspace audience, current membership, required administrator approval, and the workspace API policy. See API errors for the response contract.
- 1.
Change permissions
Choose Edit permissions from the token actions. The change applies right away and the secret stays the same. Adding permissions sends the token back to admins in workspaces that require approval. A token that belongs to a connected tool can only lose permissions here; reconnect the tool to give it more.
- 2.
Roll before a planned change
Choose Roll token to create a new secret with the current permissions and audience. The previous secret remains valid for 24 hours.
- 3.
Update every client
Replace the old secret, confirm a real API request succeeds, and remove the old value from the client.
- 4.
Revoke when access must stop
Revoke a leaked, unused, or ownerless token. Revocation cannot be undone.