logo

Create a token

A user can only have one token, which means that generating a new token will invalidate the previous one. Only someone with superuser privileges can generate a new token.

PUT /api/authenticate

Body parameters

NameTypeDescription
user_nameStringThe username of the user to generate a new token for

Body examples

{
    "user_name":"Username"
}

Response

ResponseDescription
200 OkReturns the newly generated token to be used in the X-Auth-Token header

Response examples

Status: 200 Ok

{
    "token" : "newly-generated-token-to-be-used-in-X-Auth-Token-header"
}

Can we improve this article ? Provide feedback