The backend service handles the initial client_credentials grant successfully against the CXone auth endpoint. The access token is retrieved and stored. However, when the token expires, the refresh logic in the Python script fails to obtain a new one. The POST request to /api/v2/oauth/token returns a 401 Unauthorized. The payload includes the correct grant_type and client_id, but something seems off with the secret handling. Here is the request body being sent.