Error: 402 Unauthorized Access

The 402 Unauthorized access error code indicates the API request is not completed due to a lack of valid authorization. The user will receive HTTP 401 Unauthorized status in the result. Clumio uses bearer token as an authentication scheme for the REST APIs.

Symptoms

HTTP Status:

401 Unauthorized

Response Body:

{
    "errors": [
        {
            "error_code": 402,
            "error_message": "Unauthorized access"
        }
    ]
}

Causes

  • Authentication Token is not provided
  • Invalid Authentication Token
  • Authentication Token Expired

Resolution

Please confirm if the Authorization header is formatted properly.

  • cURL command example:
-H "Authorization: Bearer ${BEARER\_TOKEN}"
  • Postman example:
    Screen_Shot_2022-03-23_at_11.02.52_AM.png
    Screen_Shot_2022-03-23_at_11.03.02_AM.png
  • If there is an Authorization header field, check whether the provided bearer token is valid or not. To learn more about how to create an API token, click here.