Skip to main content

Get Active Twitch Chatters

Introduction

This code will give you a list of all chatters currently sitting in a Streamer's Twitch Chat.

This is particularly useful if you restart your application but need to know who was in a chat when you restarted it.

Send a request to the server

You should include your cliendId and clientSecret in the body, so the server can find your extension.

Important API URL:

https://ws.chatrpg.com/api/twitch/getchatters

Body

clientId: "yourClientId",
clientSecret: "yourClientSecret"

Example of Usage

const response = await axios.post(`https://ws.chatrpg.com/api/twitch/getchatters`, {
clientId: process.env.CHATRPG_CLIENT,
clientSecret: process.env.CHATRPG_SECRET,
});

You will Receive:

  • Each object in the chatters array represents one active user.
{
"chatters": [
{
"user_id": "12345678",
"user_login": "example_user"
},
{
"user_id": "87654321",
"user_login": "another_user"
}
]
}
  • user_id is the unique identifier for the user on Twitch.
  • user_login is the user's Twitch username, which they use to log in.