EventSub fails to subscribe to event, even thought the user is a channel moderator

Hey everyone, I’m having an issue with my EventSub application not managing to subscribe to some channel events even though I think it should.

  • DEV application correctly set.
  • I’m using CONDUIT with WEBHOOK
  • A have a user (ModeratorUser) authorized to the application with the following scopes
const scopes = [
    'bits:read',
    'channel:bot',
    'channel:read:subscriptions',
    'moderator:read:chatters',
    'moderator:read:followers',
    'user:bot',
    'user:read:chat',
    'user:read:moderated_channels',
];
  • I have 3 channels setup on my application
    • ModeratorUser channel
    • AnotherUser Channel (ModeratorUser IS NOT a moderator of this channel)
    • TertiaryUser Channel (ModeratorUser IS a moderator of this channel)

For each of these channels, I want to subscribe to the following events

    channel.follow
    channel.chat.message
    channel.subscribe
    channel.cheer
    stream.online
    stream.offline

Expected: Since the user IS a moderator to all of the channels, and it gave my applications those scopes I should be able to subscribe to all of these events. But instead, this is what is happening

  • ModeratorUser channel - All subscriptions work
  • AnotherUser channel - The following subs fails (‘channel.follow’, ‘channel.chat.message’, ‘channel.subscribe’, ‘channel.cheer’)
  • TertiaryUser channel - The following subs fails (‘channel.subscribe’, ‘channel.cheer’)

The subscriptions that fail, all return the same JSON

{ 
    error: 'Forbidden', 
    status: 403, 
    message: 'subscription missing proper authorization' 
} 

So the question is, what am I doing wrong?

Also, there are different behaviors for moderated channels. I tried with 3 other moderated channels, and each of them fail on a different subscription. For example. On Channel 1 ‘channel.subscribe’ works, but for Channel 2 it fails with ‘subscription missing proper authorization’

There’s conflicting information, since you say

But also

Is it a moderator or not? If it’s not a moderator then you can’t subscribe to topics that require it being the moderator or the channel itself.

Also, channel.chat.message requires both your bot to have granted the user:bot scope, and the channel AnotherUser grant your app the channel:bot scope since your bot isn’t a moderator according to what you’ve wrote.

And for things like channel.subscribe and channel.cheer you need AnotherUser and TertiaryUser to grant you the appropriate scopes, as only the broadcaster can grant the permissions, your bot being a moderator has no impact whatsoever.

Hey Dist, thank you for the quick reply.

That is my bad. I added that case as a test, to see the differences in return. For the application itself the user I’m using is a moderator for all of the channels. I just forgot to edit the text.

Gotcha, so in that case, for the moderated ones it should work right?

Hmmm, I can’t find that information on the documentation. Going by this link for example, it only says that I need the channel:read:subscriptions scope, and nowhere that the user must grant it to the Application itself.

For the channels that your bot is a moderator it shouldn’t have issues subscribing to topics that support permissions granted through moderators.

Perhaps the documentation could do with some clearer text. In general if a topic asks just for a channels ID, and not a moderators ID, then it requires explicit permissions from that channel. Because of the sensitive nature of subscriber data, it has to be given out by the channel, otherwise you could have moderators who just grant that permission to any 3rd party app they want without the channel they are a mod for knowing that their subscriber data is being shared to these apps.

This is much like the API endpoints, where to use the Get Broadcaster Subscriptions you must use a token from that broadcaster, not a moderator.

1 Like

Ahhh that makes sense, thank you for that.