API token expiry causes session timeout during bulk performance review imports

helen_sys
Sun, 08 Jun 2025 14:30:00 +0000
Workday HCM

We’re losing data during bulk performance evaluation imports because our API tokens expire mid-process. We’re importing 5000+ evaluations via the Workday REST API and the process takes about 90 minutes, but our OAuth2 tokens have a 60-minute lifespan.

Here’s the error we’re seeing:

{
  "error": "invalid_token",
  "error_description": "Access token expired",
  "timestamp": "2025-06-08T15:45:23Z"
}

Our current token refresh logic only kicks in if we get a 401 response, but by then we’ve already lost the batch context and have to restart the entire import. This causes duplicate entries and data inconsistencies.

The bulk import session handling seems to tie the session to the original token, so even if we refresh the token, the session is invalidated. We’re on R1 2024 and using Python with requests library. How do others handle long-running API operations that exceed token lifespan without losing session state?

4 posts - 1 participant