Problem
We’ve got a Python script pulling queue analytics and admin UI layout states. The access token expires after an hour, so the run crashes. I tried wrapping a manual refresh loop around client.auth.refresh_access_token(), but it breaks the batch flow.
from purecloudplatformclientv2 import Configuration, RoutingApi
config = Configuration()
config.host = 'https://api.mypurecloud.com'
config.client_id = 'our_client_id'
config.client_secret = 'our_secret'
routing_client = RoutingApi(config)
queues = routing_client.get_routing_queues().items
The docs claim the SDK handles token rotation automatically. We’re not seeing any refresh activity in the logs. The 401 Unauthorized hits right after the first batch finishes. The SDK doesn’t log the credential swap. Is there a hidden config flag to trigger the auto-refresh mechanism? The queue export just stops.
Pulling the raw request headers next.