Does anyone know the expected behavior of the WebRTC softphone client when the underlying OAuth access token expires while a media stream is active?
We are deploying a custom AppFoundry integration that embeds the Genesys Cloud softphone. Our backend handles token refreshes seamlessly for API calls, but the embedded softphone instance consistently fails to reconnect after the initial 4-hour token window closes. The client throws a 401 Unauthorized error on the WebSocket handshake, even though our application has already fetched a fresh token via the refresh flow.
Steps to reproduce:
- Initialize the softphone using the
@genesyscloud/webchat-widget-sdkwith a valid access token. - Establish a call and wait for the access token to expire.
- Trigger a background token refresh in our integration backend.
- Attempt to re-establish the WebSocket connection using the new token.
The error log indicates the server rejects the new token despite it being valid for other API endpoints. Is there a specific header or handshake requirement for the WebRTC signaling layer that differs from standard REST API authentication? We need to ensure uninterrupted agent experience without forcing a full page reload.