Get New Subscriber Notification or Total Sub Count using Websockets?

You cannot get the total by a WebSocket but you can get new chat subscriber events as they occur.

Either

This looks like you are connecting to chat and this looks correct. You will need to preceend the channel name with a ‘#’ and needs it a;; to be lowser case. In theory you could use the anon login. saves juggily tokens.

Then just parse for messages of type USERSTATE instead of PRIVMSG then you’ll get (re)subscriptions shared in chat.

You cannot get the total subs from a WebSocket, you’ll need to poll the API for the current count. Reference | Twitch Developers which will need the token

1 Like