Python SDK token refresh hanging instead of auto-refreshing

The script crashes with a 401 Unauthorized error right when the access token expires, even though I’m using the genesyscloud Python SDK which is supposed to handle this automatically. I’ve got a simple polling loop that hits /api/v2/architect/users every few seconds, and it works fine for the first hour. Then boom, requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://mycompany.mygen.com/api/v2/architect/users. I thought the SDK client initialized with purecloud_platform_client.PureCloudApiConfiguration would just grab a new token behind the scenes.

Here’s the relevant bit of code I’m using to set it up. I’m passing the client ID and secret directly during initialization. Is there a specific flag I need to set on the config object to enable the background refresh thread? Or is the SDK just not doing what the docs claim? I don’t want to write a custom refresh handler if the library handles it out of the box.