How to find out if a channel is live using the API?

It is ridiculous that such simple task is completely unclear from the documentation, but I need help.

I need to be able to check if a certain channel is live or not.

What would the best way to do this be?

I tried using the EventSub, but after building the (ridiculously) complicated solution for such simple task I ran into issue with deleting the subscriptions.

Call Get Streams

If the channel is live you get an array with data
If the channel is not live you get an empty data array

Nice, thanks. What exactly is the user_id though? if I get channel information I only get broadcaster_id

The user_id is the broadcaster_id

Different labels are used to help describe relationships between resources and entities

Thanks a lot mate you saved me a lot of time :+1: This is the most user un-friendly api I’ve ever used :smiley:

If you have particular issues with the documentation please feel free to submit a feature request on UserVoice and include what changes you would like to see and how it will help you with what you’re struggling with.

1 Like

A post was split to a new topic: Twitch/Discord bot help/features

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