Hey, I was looking to develope a widget to show directly on stream the Twitch Hype Train progression, so I looked up to Twitch APIs documentation and the only thing I found is Get Hype Train Events.
I’m confused, how should I use it? I was expecting some sort of WebSocket spreading events in real-time, but seems like the only avaible method is an API Endpoint. How can I can retrieve Hype progress in real-time? Is this something doable? Am I missing something?
The only way I can think of is doing requests to that endpoint, but I’m worried about how many I can do and also how fast I can trigger it.
Thanks. Do you know if this can be done withing Streamelements custom coded widget? I already worked with PubSub but I’m worried this time I will need a middle server from where to subscribe to the event and then send data to SE’s widget.
At this time EventSub only offers a Webhook Transport
EventSub over sockets is in Closed Beta testing, and basically replaces PubSub.
However there is no timeline on general availability.
You are doing yourself a disservice by limiting yourserlve to SE Custom Coded Widgets. This forum is unlikely to know what SE can or cannot do, since most of use will not limit ourself to the limitations of SE.
As it stands to consume HypeTrain data “sanely” you need a middle man server to consume the EventSub information.
Ok, that’s not the first time I face this situation. Let’s say I never worded with a middle man server.
From where should I start? Can you share with me any guide on how to get started? Worth mentioning that my goal is to have a service that could be used by multiple streamers, so storing sensitive data has to be mentioned somehow.
You’ll also need a public web page that streamers would go to, in order to authorise your ability to read hype train data. So you’ll need a user oAuth web page.
You can then store or discard that user oAuth token as EventSub Webhooks uses an App Access Token to create Subscriptions to data feeds.
You would usually retain that token for “catch up” if you need to restart your system or experience any down time.
Thanks, that will help me for sure! I’m a bit worried about storing secrets/access_tokens etc on my server, is there any specific guide on how to store these sensitive data?