Access Hype Train info in a game

I’m making an app for a friend (and potentially others if it goes well) using Gamemaker Studio 2 and I’d like to access Hype Train info, but obviously you can’t get it through a regular user token.
I’m not super familiar with using the Twitch API so I’m wondering what the best method to access the Hype Train info is? It’s important that the method is as simple as possible for the end user since my friend isn’t tech savvy in the slightest.
Am I right in thinking that adding an extension to the user’s Twitch then getting the information through that would be the best way of going about it?

You would generate an Implict Access Token which is a “regular” user token, it’s just not auto refreshable

That gives you a a token to use to call

But the optimal way to handle hype train data is via EventSub. So Twitch will notify you when a HypeTrain is running.

However currently, EventSub only offers a WebHook transport, which means you need a server for this. In order to capture the events.

it would also be more optimal for the game to connect to your server, via your internal accounts system.
They the broadcaster links they game account and twithc account on the server.
Twitch communicated with your server and your server forwards data to the game. Via socket or similar

Now if this is possible in Gamemaker Studio 2, I don’t know

Unlikely, sure a extension could be used but the extension only works as a surface to provide/show things to a viewer. Not really useful for collecting data to be sent to a game. Like you describe.

An extension is generally to provide interactivity to viewers.

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