Idira Remote Access: Why we got 401 error when using the access token?

Idira Remote Access: Why we got 401 error when using the access token?

92
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 15:58 PM


Question


We successfully got the access token via API but we got a 401 error when using it. Here is the example, we got the token without an error. 
api1.png
However, when we tried to launch other calls, we got 401 errors.
api2.png

The access token does not seem to work. 


Answer


401 means Unauthorized. It will be triggered when:
- The request requires user authentication.
- Your session has expired and your user has been disconnected

You can find more details from the online page below. 
https://docs.cyberark.com/Product-Doc/OnlineHelp/Alero/Latest/en/Content/WebServices/WebServicesIntro.htm

In your case, you used "https://auth.alero.eu/auth" to authenticate and got access_token. However, you called the "https://api.alero.io/" to process the second step. This URL is pointing to the US data center. If you are using an EU data center, please use "api.alero.eu" instead.

Please also kindly refer to the following page. it stated we have different suffixes for the various data center.
> To call an Remote Access API from the EU data center, make sure the suffix in the URL is .eu. For example, api.alero.eu.
https://docs.cyberark.com/Product-Doc/OnlineHelp/Alero/Latest/en/Content/WebServices/WebServicesIntro.htm


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000017U5CAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail