A JavaScript/TypeScript client library (v20.0.0) for interacting with Genesys Cloud Streaming APIs via WebSocket and XMPP. It provides real-time event subscriptions, conversation management, and presence features for Genesys Cloud platforms. The library is actively maintained and released regularly, with TypeScript definitions included. Compared to direct WebSocket libraries, it abstracts authentication, reconnection, and message serialization. Supports both CommonJS and ESM, and is designed for Node.js environments.
npm install genesys-cloud-streaming-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a streaming client, connects, and subscribes to a presence topic.
Update constructor call to use `accessToken` and `logLevel` options.
Use ES module imports (`import`) instead of `require()`.
Replace `onMessage` handlers with `.on()` listeners.
Implement a token refresh mechanism and call `client.setAccessToken(newToken)` before expiry.
Run `npm install genesys-cloud-streaming-client@20` and ensure import uses named export.
Use `import { StreamingClient } from 'genesys-cloud-streaming-client'`.Generate a new OAuth token and pass it in the constructor.