Create an access token for a user
POST/v1/users/:username/tokens
Create an access token for a user
note
- 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.
- Each token is tied to a specific user - make sure to use the exact
username
that was specified during service account creation is put into 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
- 200
- 400
- 401
- 403
- 404
- 500
Successful response
Bad Request
Invalid Credentials
Unauthorized
Not Found
Internal Error