EventSub - Notification is premature

Hi,

Issue: Following the EventSub API example (w/ type=channel.follow), notification is firing before I can “follow” the broadcaster in Twitch. And I’ve checked that I’m not following the broadcaster at the moment.

Details:
1a. Create a subscription w/ type-channel.follow
{“type”:“channel.follow”,“version”:“1”,“condition”:{“broadcaster_user_id”:“xxx”},“transport”:{“method”:“webhook”,“callback”:“https://xxx”,“secret”:“xxx”}}

1b. Received 202 response

2a. Received request with msgType = webhook_callback_verification
{Challenge:xxx Subscription:{Id:xxx Status:webhook_callback_verification_pending Type:channel.follow Version:1 Condition:{Broadcaster_user_id:xxx} Transport:{Method:webhook Callback:https://xxx Secret:}}}

2b. Responded w/ 200 & Challenge

  1. Received request with msgType = notification, before I can follow the broadcaster in Twitch
    {Challenge: Subscription:{Id:xxx Status:enabled Type:channel.follow Version:1 Condition:{Broadcaster_user_id:xxx} Transport:{Method:webhook Callback:https://xxx Secret:}}}

Any idea why notification came before I can trigger it? Maybe it remembers if I ever followed that broadcaster?
Thanks!

It sounds like it’s working as intended.

You subscribed to received notifications when someone follows that broadcaster you specified.

After the subscription was verified and changed to enabled status, someone followed that channel and you got a notification. If you look in the event field of the payload you’ll see who it was that followed.

I’m not sure what you mean about premature notifications? You will be sent one any time that any user follows the broadcaster you specified.

It seems like you’re confusing how EventSub works, it’s not a subscription between you, the developer, and that EventSub type, it’s a subscription between an app (that doesn’t represent a user) and the EventSub type. Your user account doesn’t factor in to it at all (unless you specify yourself as the broadcaster in the subscription, or trigger a notification by being a user that follows that channel).

Thanks! That makes sense. My confusion was assuming the follow event is only triggered by me. Please close.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.