# Generating a List of Followed, Online Streams

**URL:** <https://discuss.dev.twitch.com/t/generating-a-list-of-followed-online-streams/5654>\
**Category:** API\
**Created:** [April 8, 2016, 11:05am UTC](https://discuss.dev.twitch.com/t/generating-a-list-of-followed-online-streams/5654 "2016-04-08T11:05:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sobudd](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@Sobudd](https://discuss.dev.twitch.com/u/Sobudd)\
**Post date:** [April 8, 2016, 11:05am UTC](https://discuss.dev.twitch.com/t/generating-a-list-of-followed-online-streams/5654/1 "2016-04-08T11:05:59Z")

</div>

Hi guys, first off I want to apologise for my severe lack of knowledge in this area - I haven’t been doing this very long!

I’m trying to generate a list of the top 15 streams that I am following to display on localhost.  
I gather I’m going to be using something along the lines of the

**GET /steams/followed**

command, but I’m running into issues with how I go about authenticating myself, and where I enter it (as a .js file?).  
I assume I’m going to also need

**stream\_type: live** , **limit: 15**

In there somewhere also.

Any help appreciated - thanks in advance!

---

<div class="post-metadata">

**Author:** ![IllusionaryOne](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/illusionaryone/32/2011_2.png) [@IllusionaryOne](https://discuss.dev.twitch.com/u/IllusionaryOne)\
**Post date:** [April 8, 2016, 9:01pm UTC](https://discuss.dev.twitch.com/t/generating-a-list-of-followed-online-streams/5654/2 "2016-04-08T21:01:23Z")

</div>

This is how I do it, although there may be a simpler way…

1. Setup an application in your Settings \> Connections. Call it whatever you want and set the redirect URI to [http://localhost](http://localhost). Next screen, ask for a New Client Secret. Keep that and your Client ID.

2. Run this URL to get an access token from Twitch - replace the field as indicated:  
`https://api.twitch.tv/kraken/oauth2/authorize?response_type=token&client_id=YOUR_CLIENT_ID&redirect_uri=http://localhost&scope=user_read`

3. Look at your new URL and note down the THIS\_IS\_YOUR\_ACCESS\_TOKEN value:  
`http://localhost/#access_token=THIS_IS_YOUR_ACCESS_TOKEN&scope=user_read`

Then, you will need to build your query into Twitch and pass the access token in the header as indicated on that API page. However you do that is based on what language/API you are using to build and manage your request.

From there, you will get your streams in order I believe, not “top” if you mean by most popular in terms of follows or viewers or what ever.

---

<div class="post-metadata">

**Author:** ![Sobudd](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@Sobudd](https://discuss.dev.twitch.com/u/Sobudd)\
**Post date:** [April 11, 2016, 12:05pm UTC](https://discuss.dev.twitch.com/t/generating-a-list-of-followed-online-streams/5654/3 "2016-04-11T12:05:08Z")

</div>

Hey man, thanks for getting back to me, and sorry for replying so late!

I tried going through your steps, but after step two I kept getting

{“error”: “Bad Request”,“status”:400,“message”:“client does not exist”}

Also, what would you suggest as being the easiest way to get the list? Just a javascript file?

Thanks again, man.

---

<div class="post-metadata">

**Author:** ![IllusionaryOne](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/illusionaryone/32/2011_2.png) [@IllusionaryOne](https://discuss.dev.twitch.com/u/IllusionaryOne)\
**Post date:** [April 11, 2016, 10:11pm UTC](https://discuss.dev.twitch.com/t/generating-a-list-of-followed-online-streams/5654/4 "2016-04-11T22:11:14Z")

</div>

Did you register a client from step 1 and put in the Client ID that Twitch gives you in as YOUR\_CLIENT\_ID? That is what would cause that error 400.

The list, it depends what language you are used to and what API you are using to talk to Twitch. You can use JavaScript and try to scrape data. PHP has some good tools like HttpGuzzle for digesting data as well, it depends what you are trying to build this into I suppose. Sorry if that is vague, but, it sort of depends what you want to do with the list when you get it back and what languages you are comfortable with.

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [May 11, 2016, 10:11pm UTC](https://discuss.dev.twitch.com/t/generating-a-list-of-followed-online-streams/5654/5 "2016-05-11T22:11:25Z")

</div>

Closed on May 11, 2016, 10:11pm UTC

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