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.

RequestResponse

POST /api/authenticate

Body parameters

Name

Type

Description

user_name

String

The username to authenticate with.

password

String

The password to authenticate with.

Body examples

RequestResponse

POST /api/authenticate

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

Response

Response

Description

200 Ok

Returns the token to be used in the X-Auth-Token header

Response examples

RequestResponse

Status: 200 Ok

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

Do you have some feedback for us?

If you have suggestions for improving this article,