Skip to content

Get token via password grant

Request

Exchange username password via password OAuth grant for an access token.

Bodyapplication/x-www-form-urlencodedrequired
grant_typestring

The grant type. The only valid value right now is password

Value:"password"
Example:"password"
usernamestring

Your compass username

Example:"myEmail@gmail.com"
passwordstring

Your compass password

Example:"myP@ssword123"
POST
/compass/token
curl -i -X POST \
  https://api.blackbird.ai/compass/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d grant_type=password \
  -d username=myEmail@gmail.com \
  -d password=myP@ssword123

Responses

Access token returned successfully.

Bodyapplication/json
access_tokenstring

The access token to use for API requests.

Example:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
token_typestring

Token type, typically "Bearer".

Example:"Bearer"
expires_ininteger

Time in seconds until the access token expires.

Example:3600
Response
{ "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "token_type": "Bearer", "expires_in": 3600 }