Im trying to understand the channel chat message event from EventSub. The initial description is
”Any user sends a message to a specific chat room.”
However, the more detailed text is
“Requires user:read:chat scope from the chatting user. If app access token used, then additionally requires user:botscope from chatting user, and either channel:bot scope from broadcaster or moderator status.“
The condition additionally requires both a broadcaster and user id. Is this suggesting that we’d need both OAuth acceptance from the chatting user, and the user whose chatroom is being posted to? This seems severely limiting. I don’t think a chatbot has this same form of restriction. Is there a reason apps aren’t allowed to follow along with an authenticated user’s chatroom while bots are?
Worth noting that I tried to subscribe to the channel.chat.message event with just the broadcaster_user_id property and got a 400.
Wondering if I’m misunderstanding the idea behind this event?
if you want to use App Access Token and/or the bot badge: yes
App Access token being needed for Conduits and Webhooks
It does when using EventSub at scale via Conduits.
(ignoring IRC existing here)
Becuase you need to state
I want to read the chat of broadcaster foo
I want to login to chat and read the chat as user bar (and show in the chatter list as bar)
Granted foo and bar can be the same user if you want to “login to chat as the broadcaster”
Seems here you tried to read chat as an anon user (aka justinfan to use irc terms) but thats not supported via eventsub
This is more a question of which transport of eventsub you want to use.
Additionally there are “room join limits” in place (both for IRC and eventsub any transport), so authentication from the broadcaster (or being a mod) doesn’t take up a join “slot”.
For eventsub straight websockets you only auth as the “chat reading user” and will hit the join limit pretty quick, and not have access to bot badge.
For other transports, you get permission from the broadcaster to be present (either moderator status on the chat reading user or auth)
So essentially by authing the broadcaster, the broadcaster is “installing” the chat bot.
An app like this sounds like it’s installed to the users computer/run locally, ie not run from a server, and thus you cannot generate app access tokens without leaking the client secret.