401: Unauthorized
The 401 (Unauthorized) status code indicates that the authentication credentials received are not authorized. The user may repeat the request with a new or replaced Authorization header field.
Code | 401 |
Description | Authentication Error. |
Generic Cause | Unauthorized authentication token. |
Quick Fix | Verify whether an authentication token is obtained and ensure to provide this with each request. |
There are different types of Authentication errors and this section provides sample scenarios of authentication errors as well as tips on how to identify them.
401: Invalid access token. Please pass a valid access token
Code | 401 |
Description | Invalid access token. Please pass a valid access token |
Generic Cause | Invalid authorization token. |
Quick Fix | Check that the Authorization token is correct. |
ERROR SCENARIO EXAMPLE
ERROR CODE: "401"
MESSAGE: "Invalid access token. Please pass a valid access token"
Verify the Authorization token, and ensure that the correct token was passed.
Rename the Authorization value from "Bearer qwErtY8zyW1abcdefGHIZZZZ" to "Bearer qwErtY8zyW1abcdefGHI".
curl -X
GET "https://api.equinix.com/v1/assets/11581251"
-H "Content-type: application/json"
-H "Authorization: Bearer qwErtY8zyW1abcdefGHIZZZZ"