Skip to main content

Create an access token for a user

POST 

/v1/users/:username/tokens

Create an access token for a user

note
  • Token Creation Scope: Through the API, you can only create tokens for:
    • Your own user account
    • Service accounts within your organization
    • Admins cannot create tokens for other non-service-account members through the API
  • For service account token creation, ensure you are using an Admin token for authentication. The token generated by this call will be the service account's own token for its operations.
    • For detailed guidance on service account token creation and best practices, see Service Accounts Guide - Step 2.
    • If a new service account is created through the admin API, make sure to connect to this service account manually with a read/write token before using read scaling tokens.
  • Each token is tied to a specific user - make sure to use the exact username that was specified during service account creation in the path /v1/users/:username/tokens.
  • If the optional ttl parameter is not specified, the access token will remain valid indefinitely until revoked by an administrator.

Request

Responses

Successful response