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:
name | required | type | Value |
grant_type | required | string | Value: “client_credentials “Currently, we only support client credentials flow, the value always be client_credentials |
client_id | required | number | The client id number |
client_secret | required | string | The 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: 40
1
RESPONSE STATUS: Unauthorized.
BODY OUTPUT:
{
"error": "invalid_client",
"message": "Client authentication failed"
}