Building a custom chat UI using the Guest API instead of the default widget. The WebSocket connects fine to wss://api.mypurecloud.com/api/v2/analytics/events/realtime, but it drops after exactly 30 seconds with code 1006.
ws.onclose = (event) => {
console.log('Connection closed:', event.code, event.reason);
};
No heartbeat or ping/pong logic implemented yet. Is there a specific keep-alive mechanism required for this endpoint?