logo
logo

Get token

This resource will return an authentication token that needs to be sent in the X-Auth-Token header of every request that requires authentication. The token will remain valid until a new token is generated.

Warning

This token never expires, which makes it less secure. It is recommended to create a new token using OAuth instead.

POST /api/authenticate

Body parameters

NameTypeDescription
user_nameStringThe username to authenticate with.
passwordStringThe password to authenticate with.

Body examples

POST /api/authenticate

{
    "user_name":"Username",
    "password":"Password"
}

Response

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

Response examples

Status: 200 Ok

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

Can we improve this article ? Provide feedback