Why API response doesn't show status?

Hi,
I am using the twitch API and need besides the name and the url also the status of the channel - is it live or not.
I cant see such info in the response I am getting. Could anybody help, please?
I am using the following request-link: https://api.twitch.tv/kraken/users/ESL_SC2?client_id=API_KEY

{
display_name: “ESL_SC2”,
_id: 30220059,
name: “esl_sc2”,
type: “user”,
bio: “For standings, schedule, and results, visit http://www.intelextrememasters.com/”,
created_at: “2012-05-02T09:59:20Z”,
updated_at: “2017-05-26T22:30:10Z”,
logo: “https://static-cdn.jtvnw.net/jtv_user_pictures/esl_sc2-profile_image-d6db9488cec97125-300x300.jpeg”,
_links: {
self: “https://api.twitch.tv/kraken/users/esl_sc2
}
}

On the documentation site of twitchTV I canT find the ‘status’ (live or not at that moment) neither.
“_id”: “44322889”,
“bio”: “Just a gamer playing games and chatting. :)”,
“created_at”: “2013-06-03T19:12:02.580593Z”,
“display_name”: “dallas”,
“logo”: “https://static-cdn.jtvnw.net/jtv_user_pictures/dallas-profile_image-1a2c906ee2c35f12-300x300.png”,
“name”: “dallas”,
“type”: “staff”,
“updated_at”: “2017-02-09T16:32:06.784398Z”

Any ideas how I can get the status of the channel besides the basic info about the channel?

thank you!

You can always use the /channel endpoint. It returns channel specific data.

But if you’re looking for online/offline status, you are going to need to use the /streams?channel= endpoint`. The docs are here

thank you for the speedy answer!
I will try this!
Appreciated!

no problem… just know that if you choose to use the bulk endpoint by adding the comma delimited list of channelID’s, it will not return the null for individual streamers being offline, only those that are online currently. You will need to parse the list of returned online streams versus the list you sent on your end

The channel query param is for checking multiple streams at once. If you’re only interested in one, /streams/:channelid

I just wanted to make a point of highlighting the bulk endpoint in the response. I assume he will scroll up/down through the docs :sunglasses:

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