Workday errors in plain English.

Submit an Error
errors / rest-api / rest-401-invalid-token

REST API 401: invalid_token / Expired Access Token

✓ Verified REST API 9 lookups
The error HTTP 401 Unauthorized {"error":"invalid_token","error_description":"The access token is invalid or has expired"}

What it means

Your access token expired. Workday tokens are short-lived and your client held onto it too long without refreshing. Nothing is broken - you just need a fresh token.

Troubleshooting

  1. Decode the token's issue and expiry times and compare with the request time - most failures are simple expiry.
  2. Check that the token endpoint and tenant in the client config match the resource URL being called - IMPL tokens don't work on PROD.
  3. View the API client in Workday and confirm it's enabled and its scope covers the endpoint.
  4. If using a refresh token, check whether it's been rotated or revoked by a re-registration.
⚡ Quick fix

Get a new token from the token endpoint and replay the request.

✓ Permanent fix

Implement proactive token refresh - refresh before expiry, with a retry-once-on-401 as backstop. Alert on repeated 401s so credential rotations and client re-registrations get caught before they cause an outage.

Was this helpful?

Related errors