Skip to content

Reference

Authentication

REST API reference for Authentication: get access and refresh tokens for an account. The overview of the REST API shows the form-encoded body this operation expects. 1 operation.

Reference1 min read

For the base URL, authentication and errors, see the REST API overview.

POST /oauth/token ​

  • Request: POST /oauth/token
  • Operation: Authenticate
  • Operation ID: Authentication_AuthenticateToken
  • Authentication: none, public operation

Request body (application/x-www-form-urlencoded, required)

FieldTypeRequiredConstraintsDescription
grant_typestringyesOne of: password, refresh_tokenpassword to sign in with the credentials of the account, refresh_token to get a new access token.
usernamestringnoUsername of the account. With grant_type=password.
passwordstringnoPassword of the account. With grant_type=password.
refresh_tokenstringnoRefresh token of an earlier response. With grant_type=refresh_token.

Example request: Sign in

bash
curl -X POST 'https://YOUR_SERVER/oauth/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=password&username=YOUR_USER&password=YOUR_PASSWORD'

Responses

StatusDescription
200ok