If there is any error in API response. You can simply understand that by checking HTTP status code as well as the following JSON response that will describe the error.
Sample Error Response
401 Unauthorized - Missing Credentials
"message": "Missing API credentials",
"hint": "Supply api access credentials. i.e: Bearer token, API key"
This error will be displayed if you don't provide any access credentials. You must provide authentication credentials. Please read more about API authentication
403 Forbidden - Invalid Token
"message": "Token already expired",
"hint": "The token you provided that has been expired or revoked. Please use a new re-issued token"
This above error tells us that you are using expired access token. You need to provide valid access token. Please read more about API authentication
To understand common cause of API errors, you need to check HTTP response code and `error` property from the JSON response.
403 Forbidden - Malformed JWT Token
"message": "Malformed JWT token",
"hint": "Check your Bearer JWT token"
This means your access token format is not correct or somehow our API server couldn't be able to decode the token. You can check your bearer token (JWT) from jwt.io
403 Forbidden - Token Verification Failed
"message": "Couldn't verify bearer token",
"hint": "Probably your token was not signed properly. Check your bearer token"
Token verification failed. May be your token was not properly signed. For security reason, our API platform doesn't accept any un-signed access token. We use RSA SHA512
algorithm to sign our token. Read more about our OAuth 2.0 authentication from here