1. Home
  2. Docs
  3. New Development updates API
  4. Authentication
  5. Retrieve a token

Retrieve a token

Get a new OAuth2 token for the current client. This is the only request that do not accept a JSON body and do not require an access token. This also the only request that you must not including the Content-Type: application/json header.

REQUEST BODY SCHEMA: application/x-www-form-urlencoded

END POINT: https://api.propq.com/oauth/token

METHOD: POST

PARAMS:

namerequiredtypeValue
grant_typerequiredstringValue: “client_credentials
Currently, we only support client credentials flow, the value always be client_credentials
client_idrequirednumberThe client id number
client_secretrequiredstringThe client secret key

RESPONSE SCHEMA: application/json

RESPONSE STATUS CODE: 200

RESPONSE STATUS: SUCCESS

BODY OUTPUT:

{
  "token_type": "Bearer",
  "expires_in": 7200,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0"
}

RESPONSE SCHEMA: application/json

RESPONSE STATUS CODE: 400

RESPONSE STATUS: Bad request.

BODY OUTPUT:

{
    "error": "invalid_request",
    "message": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
    "hint": "Check the `client_id` parameter"
}

RESPONSE SCHEMA: application/json

RESPONSE STATUS CODE: 401

RESPONSE STATUS: Unauthorized.

BODY OUTPUT:

{
    "error": "invalid_client",
    "message": "Client authentication failed"
}

Was this article helpful to you? Yes No

How can we help?