I’m working on a chat bot that needs to know if a specific user is currently online in twitch (regardless to a specific channel), right now I’m creating an ‘Online Users’ list by periodically calling:
https://tmi.twitch.tv/group/user/channel_name/chatters to generate a list per channel * list of channels my bot is sitting in.
that works, but is kinda of an overkill to what I need and not so reliable.
I’ve been looking online trying to find an undocumented api call to query user state (on twitch/offline) but I don’t think there is one…
Is there a way I can get access to query the API for this data?
No, you can’t find out whether a user is online or not. /Chatters only contains the users name if they are actually online and active in chat. If they have chat disabled you will not see them. There is no endpoint that is a yes/no flag for a user being online.
Thanks for the reply @tournymasterbotCurse I understand what /Chatters return, it’s ok and I can use it for what I need but its messy and I only need a small portion of the return users list.
Thanks for clarifying that currently there’s no API end point for user state.
This is a feature request… so I’m hoping twitch will be able to implement this on their end, but I’m not very optimistic about it
Cool Ill post it there. thanks!
It’s invasion of privacy…
If I’m NOT in your channel I don’t want you to know where I am (or even if I’m online at all).
And horrible to lookup if x is online anywhere on the site at all.
Let alone wildly inaccurate.
@BarryCarlyon thanks for replying. my bot service users who logged in (via twitch) to my website, the reason I want this end point is so my bot will have access ONLY to users who signed up and are aware to the bot, therefore reducing privacy issues (which matter a lot to me and to my business logic).
I’m not sure why you think it’s horrible to lookup if X is online… it’s what I need in order to serve data to my users.
Can you elaborate on this?
@BarryCarlyon In general I’d agree, but having the ability to gate with a user oauth token would provide legitimate services an avenue to get your online state. It would probably be pretty low on the priority queue if it was picked up at all, but I can see legitimate (and illegitimate) uses for the feature.
@Whois - Generally, defining ‘online’ is difficult. Usually the best you’re going to get is ‘did some action within the last time period’, which in terms of twitch, people lurk on chat all the time, leave video streams open, etc. None of it actually indicates the user is there, other than their computer exists in some fashion in the intarwebs.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.