How to use "http://tmi.twitch.tv/group/user/CHANNEL_NAME/chatters"

I am trying to make my own twitch bot and from research was told “http://tmi.twitch.tv/group/user/CHANNEL_NAME/chatters” is the best way to track watch time of users. Except I have no idea how to extract the users’ data from the link

There is no way for you to track a users watch time. That endpoint you listed just returns the list of users who are in chat, that doesn’t mean that they are actually watching the stream at all. That endpoint is also undocumented and subject to being removed, or changed, at any time and without warning.

Also, if you’re wanting to track user data you may want to be careful of the legal issue surrounding privacy laws, specifically GDPR compliance.

I was thinking more for a loyalty program using points pre certain amount of time. That’s all. I’ve seen other bots do it, how do they do it?

Some loyalty bots use that endpoint and just accept that it’ll be inaccurate and easy to game the system by people who may not even have the stream open, and also aware that at some point in the future that endpoint will likely be removed and make their points system no longer viable.

Other loyalty points systems use extensions, which can be somewhat easier to maintain compliance with GDPR and other privacy laws as those sort of loyalty points systems are opt-in as the user has to choose to share their ID. Extensions have the downside though that not all platforms can use them.

The most accurate points system is Twitch’s own channel points system. 3rd party integration is very limited at the moment, but there are more endpoints planned for it in the future.

Okay sounds good, I’ll just work on other features until those endpoints come out. Thanks for the help!