Getting recent followers/hosts/viewers/subs

for a personal project I have been working on a bot. The docs for the API has helped me alot but is there a good way to get the most recent follows/hosts/subs and current viewers. I know bots do this because I see it all the time.

EDIT:I am doing chat through IRC, is there a way this might help?

Hi there,

There is no endpoint that will serve this to you unless you work for it. I’ll give you some more info:

Followers and Subscribers
To get the recent followers you will need to pull the Follows from the API and look for new entries The same goes for Subscribers.

Hosting
Host messages is sent through the HOSTTARGET if you require

CAP REQ :twitch.tv/commands

Starting of a host would show like

:tmi.twitch.tv HOSTTARGET #hosting_channel :target_channel [number]

while ending a host would be

:tmi.twitch.tv HOSTTARGET #hosting_channel :- [number]

for more info about this, please look at the IRC documentation

This is undocumented in the official documentation, but hosts can also be retrived here:

http://tmi.twitch.tv/hosts?include_logins=1&target={id} for users hosting your channel

http://tmi.twitch.tv/hosts?include_logins=1&host={id} for what channel you are hosting

{id} is of course the _id field from /users/ or /channels/.

as posted about here

Viewers
Chatters joining and leaving the chat is sent as JOIN and PART if you require

CAP REQ :twitch.tv/membership

users joining the channel will be shown as

:twitch_username!twitch_username@twitch_username.tmi.twitch.tv JOIN #channel

while leaving the channel is shown as

:twitch_username!twitch_username@twitch_username.tmi.twitch.tv PART #channel

There is also an undocumented call for this under

http://tmi.twitch.tv/group/user/{CHANNEL}/chatters

where {CHANNEL} is your target channel.

Hope this helped you out some.

2 Likes

Thank you I really do appreciate it! I think this will help. I will post any questions if I have any.

EDIT: This all worked and I have no questions.

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