Embed Hosted Streams

Hey, everyone. We’re working on a page for our website that displays an embedded Twitch player and the goal is to have it update automatically when one of our clients is live. Unfortunately, we can’t figure out how to work with the API well enough to make this happen. We’ve been reading over this doc, but hasn’t lead us in the right direction.

Does anyone have a working implimentation of an embedded player that supports hosting we can look over?

Thanks!

Unfortunately you were looking at outdated documentation. The up-to-date documentation can be found at http://dev.twitch.tv/docs.

You can query the GET https://api.twitch.tv/kraken/streams/ endpoint described at https://dev.twitch.tv/docs/v5/reference/streams/#get-live-streams. I suppose you have a predefined list of streamers you want to check whether they are live or not? You can filter for specific channels with the channels query-parameter (note that it takes channel-ids, not names):

GET https://api.twitch.tv/kraken/streams/?channel=2344325,546456,3452345,...

you should always reference channels (users, but basically everything) by their id. if you need to turn a channel name to a channel id however, you can use this:

GET https://api.twitch.tv/kraken/users?login=name1,name2,name3,...

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