EventSub cannot subscribe on multiple users unlike PubSub?

Hello!

I switched to the EventSub flow from PubSub, but started getting an error when trying to subscribe to a topic - “websocket transport cannot have subscriptions created by different users”

Here’s how my implementation works in general:

  • I have a server which connects to the twitch EventSub via websockets and I use this connection to subscribe on “channel.channel_points_custom_reward_redemption.add” topic for all of my clients.
  • When I receive new notification from twitch, I send it back to my clients. So my server basically works almost like a proxy and it manages subscriptions for all users.

But I guess this approach just doesn’t work for EventSub flow?
Should I open websocket connection on the client side for each of my clients? I initially decided not to do it because I’m using OAuth Authorization flow and I wanted to keep access token on my server without sending it to the client at all. Is this a valid approach or should I change it?
Should I maybe use Webhook flow for this?

Thanks in advance)

Conduits is the solution here. On the server side they allow you to use the WebSocket transport with an App token and do not have the same limitations as using a User Token with Websockets as that’s generally designed for client-side apps where a user would only be subscribing to topics that directly relate to them.

Webhooks or conduits is the way to go here.

Since you are just doing channel.channel_points_custom_reward_redemption.add I’d go with a webhook myself.

A conduit might be overkill for one topic. when this is also somewhat low traffic compared to others.

But my preference on the described use case here is:

Or depending on what is being done with the data since you are jsut acting like a proxy then cut out the server all together and have the broadcaster directly connect to Twitch (over websocket transport) with DCF/Device Code flow auth (saves starting a web server to retrieve a token) and avoid the middle man.