Hi Nicolas.
Just in case you haven't seen it there are some limitations to be aware of. See Usage Limitations and Combine Related Topics?
But I feel like the decision should be based on which part of the application needs the notifications:
- If it's the back-end that needs to process notifications for all users, then that would lend itself to your first option: Use the "Client credentials" to open one websocket and subscribe each user on this websocket. So the channel contains many subscriptions.
- If it's the front-end that needs to process the notifications for just the current user, then that would lend itself to your second option: Use the "Code authorization / PKCE" to open a websocket per user and subscribe this user on this websocket. So the channel contains only one subscription.
------------------------------
Nick Tait
Genesys Consultant
------------------------------
Original Message:
Sent: 11-24-2025 09:50
From: Nicolas Pinçon
Subject: Best solution for notification pattern : one websocket or one per user ?
Hello,
We have an application that integrates with Genesys Cloud with 2 oauths:
- One "Client credentials" used by backend for "general" api call (not related to conversations)
- One "Code authorization / PKCE" fetched by frontend that allows us to act on conversations (mute, hold etc.)
We want to use the notification API on the v2.users.{id}.conversations channel to be notified when something happens during call, and we see 2 different solutions:
- Use the "Client credentials" to open one websocket and subscribe each user on this websocket. So the channel contains many subscriptions
- Use the "Code authorization / PKCE" to open a websocket per user and subscribe this user on this websocket. So the channel contains only one subscription
Can you confirm that both solutions are valid ? And can you give advice on the good pattern here (and why) ?
Thanks,
Nicolas
#PlatformAPI
#WebMessaging
------------------------------
Nicolas
------------------------------