Genesys Cloud Statistics API WebSocket reconnect logic failing with 401

My configuration keeps failing…

I’m polling /api/v2/analytics/queues/realtime via a Vue 3 composable but the connection drops every 60 seconds. I need the raw WebSocket implementation for v2.queue.events to push waiting count and agent availability without polling overhead.

  • Tried using the standard fetch with Authorization: Bearer header but hit rate limits after 100 requests.
  • Attempted to open a direct WebSocket to wss://api.mypurecloud.com/v2/queue/events but the handshake fails with a 401 Unauthorized error despite valid OAuth token.