# HTML EventSub subscriber extension (no EBS)

**URL:** <https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322>\
**Category:** Extensions\
**Created:** [August 31, 2021, 7:44am UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322 "2021-08-31T07:44:12Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiny](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@Shiny](https://discuss.dev.twitch.com/u/Shiny)\
**Post date:** [August 31, 2021, 7:44am UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/1 "2021-08-31T07:44:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 31, 2021, 8:48am UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/2 "2021-08-31T08:48:19Z")

</div>

> [@Shiny](#):
>
> It seems so simple yet I can’t find any examples… so maybe it’s not possible?

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

Heres a node example.

> <https://github.com/BarryCarlyon/twitch_misc/tree/main/chat>
>
> //github.com/BarryCarlyon/twitch\_misc/tree/main/chat

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

---

<div class="post-metadata">

**Author:** ![Shiny](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@Shiny](https://discuss.dev.twitch.com/u/Shiny)\
**Post date:** [August 31, 2021, 9:09am UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/3 "2021-08-31T09:09:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 31, 2021, 9:13am UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/4 "2021-08-31T09:13:46Z")

</div>

> [@Shiny](#):
>
> your 4 part blog extension series. Very informative.

FOUR IT HAS FIVE PARTS CURRENTLY!

![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/6/672a0ab271c7e00bf180970d7f0e29b1b989a9b7.png)

> [@Shiny](#):
>
> I hadn’t thought of using the chat, so thanks for the redirection.

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

> [@Shiny](#):
>
> i.e. personal use only, no published extension.

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

---

<div class="post-metadata">

**Author:** ![Shiny](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@Shiny](https://discuss.dev.twitch.com/u/Shiny)\
**Post date:** [August 31, 2021, 9:29am UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/5 "2021-08-31T09:29:48Z")

</div>

Apologies: [Twitch Extensions Part 5 – Dev Environment – Barry Carlyon](https://barrycarlyon.co.uk/wordpress/2021/03/15/twitch-extensions-part-5/)

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.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 31, 2021, 9:31am UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/6 "2021-08-31T09:31:19Z")

</div>

> [@Shiny](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Shiny](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@Shiny](https://discuss.dev.twitch.com/u/Shiny)\
**Post date:** [August 31, 2021, 12:00pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/7 "2021-08-31T12:00:38Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 31, 2021, 12:35pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/8 "2021-08-31T12:35:16Z")

</div>

> [@Shiny](#):
>
> donations

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.

> [@Shiny](#):
>
> follows

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

> [@Shiny](#):
>
> bits (for example, cheers)

PRIVMSG parse for the `bits` tag

> **[Twitch IRC Tags](https://dev.twitch.tv/docs/irc/tags/)**
>
> Twitch IRC Tags Most IRC messages provide enough information that you can figure out what happened. For example, in the following PRIVMSG message, you know that user abc posted HeyGuys in the xyz channel. :abc!abc@abc.tmi.twitch.tv PRIVMSG #xyz...

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

---

<div class="post-metadata">

**Author:** ![Shiny](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@Shiny](https://discuss.dev.twitch.com/u/Shiny)\
**Post date:** [August 31, 2021, 12:54pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/9 "2021-08-31T12:54:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 31, 2021, 12:56pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/10 "2021-08-31T12:56:33Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Shiny](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@Shiny](https://discuss.dev.twitch.com/u/Shiny)\
**Post date:** [August 31, 2021, 1:12pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/11 "2021-08-31T13:12:31Z")

</div>

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… 🙂

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 31, 2021, 1:13pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/12 "2021-08-31T13:13:33Z")

</div>

> **[twitch\_misc/eventsub/handlers at main · BarryCarlyon/twitch\_misc](https://github.com/BarryCarlyon/twitch_misc/tree/main/eventsub/handlers)**
>
> main/eventsub/handlers

😃

---

<div class="post-metadata">

**Author:** ![Shiny](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@Shiny](https://discuss.dev.twitch.com/u/Shiny)\
**Post date:** [August 31, 2021, 2:23pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/13 "2021-08-31T14:23:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 31, 2021, 2:24pm UTC](https://discuss.dev.twitch.com/t/html-eventsub-subscriber-extension-no-ebs/33322/14 "2021-08-31T14:24:56Z")

</div>

twitch-cli

> **[GitHub - twitchdev/twitch-cli: The official Twitch CLI to make developing on...](https://github.com/twitchdev/twitch-cli)**
>
> The official Twitch CLI to make developing on Twitch easier. - GitHub - twitchdev/twitch-cli: The official Twitch CLI to make developing on Twitch easier.
