tokens

Create an access token for a user

Creates an access token for a service account or for your own user account. Requires an Admin token when creating service account tokens.

post/v1/users/{username}/tokens

Request

  • Base URL: https://api.motherduck.com
  • URL: https://api.motherduck.com/v1/users/{username}/tokens
  • Auth: HTTP bearer

Path parameters

usernamestring required

user within the organization

Request body

ttlnumber

token expiration in seconds

namestring required
descriptionstring

free-form notes on the token's purpose

token_type'read_write' | 'read_scaling'

Example request

{
  "ttl": 3600
}

Response

Successful response

tokenstring required

access token

idstring uuid required
namestring
descriptionstring

free-form notes on the token's purpose

expire_atstring

Time token expires at

created_tsstring required

Time token was originally created

read_onlyboolean required
token_type'read_write' | 'read_scaling' required

Changes

No recorded changes to this operation across all 1 revision of this API.