When this happens
TheAuthorization header is missing or malformed, or the key is unknown, revoked, inactive, or for the other environment. Sandbox keys start with ppiq_test_ and work only against https://api.sandbox.paypathiq.com.
What to do
Check that you sendAuthorization: Bearer <key> to the base URL for the key’s environment. If the key was revoked or lost, create a new one. See Authentication.