While issuing a collector API request, the following error is returned.
"status" : 401,
"id" : "SZAYP-CHLBB-6SL1Z",
"code" : "unauthorized",
"message" : "Credential could not be verified."
While the common reason for this is bad credentials (access id or access key), another reason for this is when a service whitelist is set up for an account and all API requests (similar to UI access) are required to be made from the specified IP addresses in service whitelist section
1. Make sure to use correct credentials (access id and access key for a given user) in the API per the documentation
2. If the above step does not correct the issue, check whether a service whitelist was created for the account by going to Administration -> Security -> Service Whitelist Settings tab. If a whitelist exists, make sure that the server IP address from which the API request is being made is included in the Whitelist for a successful API request.