Using an API for notifications

hi guys. i was wondering if its possible to use one of the API`s so that i will build a program to work on the background and notify me when a spesific streamer plays a spesific game.
for example even when my browser is not open, i will get notification that “PLAYER1” started a call of duty stream.
and a notification when he stops streaming call of duty.
and if it is possible, how can i do that (i mean besides coding the program), which API and how to use it

It’s certainly possible. You would need to periodically poll the Get Streams endpoint (for example, once a minute) and request that specific streamer. When they’re offline you’ll get no data, or when they’re online you’ll get the data about their stream.

Alternatively, a more responsive approach would be to use EventSub and subscribe to the and stream.offline types, which would mean Twitch will send you notifications when the stream goes online. EventSub does require hosting a HTTPS server though, that’s accessible to the internet, so this solution may or may not be an option depending on your circumstances.

As to how your app would alert you once it got the information that the stream is online would be entirely up to you to devise.

You’d also need to track channel.update for mid stream game changes.

In case someone starts on Just Chatting then swaps to Call of Duty

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