Getting the userlist throught the API

Hi everyone,

I’m currently writing a chat bot (yes, another, sorry about that), but I’m experiencing a strange behavior while tracking users that come in and go out the chan (via IRC). Therefore, I decided to get a “clear list” by requesting directly the API for users.
I tried to get the list through
https://api.twitch.tv/kraken/streams/STREAM

But… no list is provided. I looked around, and found this :

http://tmi.twitch.tv/group/user/STREAM/chatters

It works good, but I read that it’s a non documented/non stable/deprecated endpoint to use.

So, the question is : is there a list of users in chan in the API, and if not, is the second URL good to use ?

Thanks in advance
NainzguL

The latter is undocumented, but it’s not going anywhere for as long as the viewer list exists on the website in its current form.

Hi again.

After using the TMI request (I don’t really know how to call it, but the second URL I provided in my first message), I’ve a got a few feedbacks on it :

  • First, it’s pretty slow to respond. I make a request on it once every 30 secondes (approx.), but it answers in like 1 or 2 seconds (which is slow in our world).
  • Second, it’s pretty unaccurate : I mean, whenever a user comes in, speak in the chat, and do stuff with my bot, he’s consider as “not connected”. There is an interval (like 30 seconds ?) before twitch give me this user in the list of connected users.

So my questions are : is this normal ? Should I manage my own presence list to improve the twitch’s behavior ? Is there an update in the roadmap ?

Thanks again
NainzguL

Yes, it is slow. It doesn’t need to be fast for the website. Also yes, it’s cached pretty heavily and inaccurate as such.

OK, then, if it’s all normal, I’ll do with it.

Thanks a lot for your answers, 3ventic.

Since a few days this URL is not working correctly.

For multiple channels the chatters count is often 0. I even get an HTTP 504 Error very often. Is there any problem with this endpoint? Or is it planned to make an official and documented one?

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