HTML EventSub subscriber extension (no EBS)

Hi, I’m starting a new extension and have some questions.

For a personal project I am creating an extension because I would like some twitch interaction information.

I would like to create an panel extension that I will only running locally (in Dev Rig for example) for my channel only. i.e. personal use only, no published extension.

I want to be notified about subscribers to my channel or donations, then I can call a local server on my machine, then … whatever, automation, lights, robotics in my house etc.

I am hoping I can do this just with a client only solution and no EBS.

It seems so simple yet I can’t find any examples… so maybe it’s not possible?

Extension Panel requirements:

  • Connects to twitch
  • Listens to subscribers to my channel
  • Listens to dontations to my channel

Any information / examples / suggestions greatly received.

You could connect to chat anononmously and listen for USERNOTICE’s
Which works in the browser via websockets.

Heres a node example.

You’d just need to swap some bits from “node WS” to “browser WS”

OK, great, thanks. I’m already using web sockets locally, so it should be easy to convert.

I hadn’t thought of using the chat, so thanks for the redirection.

Thanks also for the quick response and your ~4~ 5 part blog extension series. Very informative.



But yeah without an EBS then you’ll need the frontend to connect to chat anonomously.

Since every other method will require User Tokens, and whilst, sure, this is a

you probably don’t want to juggle users tokens publically in the wild, just in case!

Apologies: Twitch Extensions Part 5 – Dev Environment – Barry Carlyon

Yeah, setting up or finding a free (managed) secure server with SSL to host node.js is a whole extra effort, but would be the next direction to open up other possibilities.

I saw your NGINX advice, then I can run a home server, and connect with SSH. Still need to find a reliable free, managed NGINX server… I haven’t looked TBH.

No “live/real” server? You probably want the NGROK solution instead.

The Nginx solution involves SSH shenangians and NGROK will handle that for you instead.

So Method 1 on the linked post instead.

And I don’t think theres “managed nginx servers” out there for this use case. Since the nginx is usually used for hosting websites. rather than mucking about with reverse SSH tunnels.

Ah, yes. I understand method one, now. This is the best option for my case.

Just been looking at what available in the chat API.

I saw that USERNOTICE’s can be used for subscriptions to my channel.

Do you know if the same is true for donations, follows and bits (for example, cheers)

Thanks again for you help to me and the dev community!

Donations (you mean tips coz you are not a charity) are provided by a third party service so no they probably are not in chat, depends on the service you use.

No that would need eventsub which you can consume via ngrok,
could do that with subscriptions too since you have ngrok…

or keep polling the API

PRIVMSG parse for the bits tag

So, since you are an extension, and using ngrok, you could use eventsub for all the things and the server that servers your extension files can server EventSub webhooks.

So your NGROK server points to the Extension server and the Extension server can also act as your EBS.

Or also put your EBS behind NGROK

Good discussion.

So Lowest Common Denominator, if I want Follows, I need to use EventSub (which can also be used for Subscriptions too).

If I now decide to use ngrok (I have to for SSL), then I actually don’t need an extension at all, since it doesn’t provide all the events I need. The only thing I need is an EBS, either using my existing running server (node.js) (for personal project), or create a new dedicated server for EventSub.

So that begs the question why going the extension route in the first place :smiley:

But yeah to consume events you just need a server capable of recieving data from Twitch.
And ngrok can do the SSL and “web accessable” bit for you

Lack of knowledge on my part… and looking for the less complicated solution. :lazy:

OK, cool, so I’ll search your examples looking for a EventSub service for subscriptions, tips, followers and bits then… :slight_smile:


1 Like

Secondary question. What is the best way to test the EventSub logic without real user interactions.

Initially so I can see the content of a valid payload and then to test.