HTTP status code
Unauthorized
Authentication is required and either missing or invalid.
Despite the name, 401 means unauthenticated rather than unauthorised. The server does not know who you are. It should return a WWW-Authenticate header describing how to authenticate — and when it does not, that omission is itself a bug worth fixing.
Decode the token and check its expiry claim before anything else. If it is valid, confirm the server is verifying against the current signing key — key rotation without a grace period produces exactly this failure, all at once, for everybody.
If an authenticated monitor starts returning 401 on a schedule, the cause is almost always a credential with an expiry nobody tracked. Monitor the token's expiry, not just the endpoint.
Monitor for 401 responses free401 means the server does not know who you are — authenticate and try again. 403 means it knows exactly who you are and you still may not do this. Retrying with the same credentials fixes a 401 and never fixes a 403.
Usually clock skew or key rotation. If the server's clock is ahead of the issuer's, a freshly issued token can appear to be issued in the future or already expired. Check NTP sync on both.
Pingura checks your endpoints from five regions and alerts on the status code, not just reachability.
Get Started Free