TwitchApi.EventSub (twitch_api v0.1.2)

Start using Twitch EventSub

You can test all your subscriptions using:

https://github.com/twitchdev/twitch-cli/blob/main/docs/event.md#verify-subscription

Link to this section Summary

Link to this section Functions

Link to this function

list_event_subs(client_id, app_access_token)

List all event sub listeners

There is a maximum, so make sure to stop listening at some point

Link to this function

listen_to_channel_points_used(client_id, app_access_token, callback_url, secret, channel)

Start listening to channel points usage

https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelchannel_points_custom_reward_redemptionadd

Scopes required: channel:read:redemptions or channel:manage:redemptions

Link to this function

listen_to_follows(client_id, app_access_token, callback_url, secret, channel)

Start listening to follows

https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelfollow

Link to this function

listen_to_stream_offline(client_id, app_access_token, callback_url, secret, channel)

Start listening to when the streamer goes offline

https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#streamoffline

Link to this function

listen_to_stream_online(client_id, app_access_token, callback_url, secret, channel)

Start listening to when the streamer comes online

https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#streamonline

Link to this function

listen_to_subscriptions(client_id, app_access_token, callback_url, secret, channel)

Start listening to subscriptions

https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelsubscribe

Scopes required: channel:read:subscriptions

Test using the twitch cli: twitch event verify-subscription subscribe -F https://localhost:4001/webhooks/listen-to-subscriptions

Link to this function

stop_listening_to_channel_points_used(client_id, app_access_token, subscription_id)

Stop listening to channel points usage

Link to this function

stop_listening_to_follows(client_id, app_access_token, subscription_id)

Stop listening to follows

Link to this function

stop_listening_to_stream_offline(client_id, app_access_token, subscription_id)

Stop listening to when the streamer goes offline

Link to this function

stop_listening_to_stream_online(client_id, app_access_token, subscription_id)

Stop listening to when the streamer comes online

Link to this function

stop_listening_to_subscriptions(client_id, app_access_token, subscription_id)

Stop listening to subscriptions