How to get all live channels that a person follows?

So I’ve been triyng to get all channels that a user follows purely with jquery/JS. What I got so far is this:

Is there any way to get a user’s followed channels with just their username?

My problem is that the URL only checks the currently logged in user btw.

1 Like

You can use the Get User Follows endpoint and use the from_id param.

If you don’t know how to get the ID from a username, use the Get Users endpoint and specific their username as the login param. In the response will be their Twitch ID which you can use with that Get User Follows endpoint.

1 Like

Yea you will need to use the new twitch api with the ID as Dist mentioned.
But you will need to use multiple call.

You would need to call
which returns all the users that the person follows, but not who are strictly live. For the “live” part you need to call to Streams, like so:
IE:… etc.

You might also have to repeat both of those calls multiple times if the number of follows is > 100, if you do, the second call will need to pass the cursor from the first:

New twitch api is not super convient for gathering lots of information.
Like if a person has 300 followed, in order to return a full list of everyone live right now you would need to call the Follows api 3 times, then make 3 separate calls to streams in which you fill all the ID’s from the first call into the parameters. Then append the resulting json’s together to get your final list of live users a person follows.

It is a pain.


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