The WebSocket connection to our Cognigy bot via AppFoundry keeps timing out after 45 seconds, followed by severe audio latency. We’re using the standard Node.js ws library with the /api/v2/analytics/conversations/events endpoint.
Here’s the connection setup. It throws an ECONNRESET right after the auth handshake completes.
const ws = new WebSocket(‘wss://api.mypurecloud.com/api/v2/analytics/conversations/events’, {
headers: { ‘Authorization’: Bearer ${token} }
});