I’m curious if I can monitor multiple streamers simultaneously using one EventSub subscription on Twitch. Currently, I’m making separate subscriptions for each streamer, like shown in the code below:
JsonObject requestBody = new JsonObject()
.put("type", "stream.online")
.put("version", "1")
.put("condition", new JsonObject().put("broadcaster_user_id", BROADCASTER_ID))
.put("transport", new JsonObject()
.put("method", "webhook")
.put("callback", CALLBACK_URL)
.put("secret", "DEIN_GEHEIMNIS")
);
I was hoping to use an array of broadcaster IDs, but that didn’t work as expected. Can I track multiple broadcasters with a single subscription or must I stick to individual ones?
Yeah, I hit this exact same wall building a multi-streamer dashboard last year. Twitch’s EventSub API forces you to create one subscription per broadcaster - seems wasteful at first, but it’s actually not bad. I was tracking about 20 streamers and found that separate subscriptions made rate limiting way easier to handle. Plus if one streamer’s subscription breaks or needs renewal, it won’t mess up the others. The only real pain is the initial setup and tracking all those subscription IDs in your database. Performance isn’t an issue though - all the webhook callbacks still hit your single endpoint, so event handling stays clean even with multiple subscriptions.
Nope, Twitch EventSub doesn’t let you use multiple broadcaster_user_ids in one subscription. Each subscription only watches one broadcaster - they built it this way so you always know exactly which streamer triggered an event. You’re already doing it right by creating separate subscriptions for each streamer. That’s literally the only way to do it. Sure, it means more API calls upfront, but you get way better control and debugging is much simpler when things break. The rate limits are pretty reasonable too, so multiple subscriptions won’t hurt unless you’re tracking hundreds of streamers at once.
yup, no way around it. it’s one broadcaster per sub for now. makes things less messy and they went for simplicity. so yeah, separate subs is the way to go.