On this page

    Create a Token for a User

    This API creates a personal access token associated with a specific user, based on the user ID.


    Enterprise Edition only


    You cannot create a token for another user with your own user account. Tokens may only be used by the user performing the API call. This means administrators cannot create multiple tokens to distribute to other users at an organization.


    POST /api/v3/user/{id}/token


    You must enable Personal Access Tokens to successfully call this API.

    Request Input

      "label": "my-token-description"
      "millisecondsToExpire": <time in milliseconds>


    • label - A description for your token.
    • millisecondsToExpire - Duration of time in milliseconds for the token to stay in effect.

    Response Output

    Returns the token as a string.


    Response codes

    • 403: The token user must be an admin.
    • 404: User entity not found.

    Example: Curl

    curl --request POST \
      --url http://localhost:9047/api/v3/user/<uid>/token \
      --header 'authorization: _dremioha5lrg03obu079o4fkaev5e4r8n' \
      -d '{
    	"label": "my-token-description",
    	"millisecondsToExpire": "604800000"