Obtain or refresh an OAuth access token

Prev Next
Post
/oauth/token

Issues OAuth 2.0 access tokens.

Body parameters
Obtain an access token

Obtain a new access token.

{
  "grant_type": "password",
  "username": "{{username}}",
  "password": "{{password}}",
  "client_id": "{{client_id}}",
  "client_secret": "{{client_secret}}"
}
Refresh an access token

Obtain an access token using an existing refresh token.

{
  "grant_type": "refresh_token",
  "client_id": "{{client_id}}",
  "client_secret": "{{client_secret}}",
  "refresh_token": "{{refresh_token}}"
}
object
grant_type
string Required

OAuth 2.0 grant type. Use password to obtain an access token with username and password, or refresh_token to obtain a new access token using an existing refresh token.

Valid values[ "password", "refresh_token" ]
username
string

Username of the user. Required when grant_type is password.

password
string (password)

Password of the user. Required when grant_type is password.

client_id
string Required

Client identifier (consumer key) of the OAuth client.

client_secret
string (password)

Client secret (consumer secret) of the OAuth client.

refresh_token
string

Refresh token issued by a previous token request. Required when grant_type is refresh_token.

Responses
200

Successful token response.

{
  "access_token": "37aa9ab9-13d4-4a56-a774-c593889ce83f",
  "token_type": "bearer",
  "refresh_token": "99e467c8-a113-41b3-81b0-14ec947d1802",
  "scope": "trust"
}
object
access_token
string

Access token to use in authorized API calls.

token_type
string

Type of token, usually bearer.

refresh_token
string

Refresh token that can be used to obtain a new access token.

scope
string

Space-delimited list of scopes granted by the token.