Running into a weird auth loop with the @genesys/cloud-messaging-js-sdk. The refresh token callback fires, returns a new access token, and logs it correctly. Yet the very next API call to /api/v2/conversations/messages gets a 401 Unauthorized. Checked the headers. The Authorization: Bearer header has the fresh token. Swapped it into Postman and it works instantly. Suspect clock skew between the node process and Genesys servers, but the drift is less than a second. Here’s the config:
const config = {
client_id: process.env.GC_CLIENT_ID,
client_secret: process.env.GC_CLIENT_SECRET,
refresh_token: process.env.GC_REFRESH_TOKEN,
};
The SDK handles the refresh internally. No custom interceptors. Just standard initialization. What am I missing?