Currently I use the TMI API (Twitch4J) to receive all Chatters, however I would like to receive or be able to filter only those who are actually watching, I would like to know if it is possible to search only the users who are running live at the time of the search.
It is not possible to get which users are watching a stream.
Extensions wouldn’t include any user who doesn’t opt-in to your tracking, or is watching in any of the numerous ways where the extension wont be loaded.
Viewership data is private, and for privacy reasons is not accessible to any 3rd party with the exception of Game Developers and even then it’s still limtied to users who are watching a game by that developer, and both the viewer and channel have opted in.
Ok, I get it. What I would like to do is a personalized points system, just like the official Twitch points system, points are only earned if the user is actually watching. In that case, the only way to do it would be to monitor the latest messages sent?
Most similar systems use the chatters endpoint, and just accept the fact that because it’s an undocumented endpoint that it will change/break at any time or be removed in the future. Because it’s just users connected to chat it’s why almost all points systems by 3rd parties are exploitable by bots, and will give points to users who do not even have the stream up.
Now that Twitch has given more API integration with the Channel Points system, you should utilize that if you are able.