Chatbots & IRC Guide


Twitch offers an IRC interface to our chat functionality. This allows you to, for instance:

While our IRC server generally follows RFC1459, there are several cases where it behaves slightly differently than other IRC servers; as described below, there are many Twitch-specific IRC capabilities. The differences are necessary to accommodate:

Syntax Notes

All references to <channel> and <user> are to channel and user names (not IDs, as in the API endpoints).

Always enter the channel name (<channel>) in lowercase.

The examples below use these syntax conventions:

Lines prefixed with: Are sent from: To:
< client server
> server connecting client

Connecting to Twitch IRC

To connect:

 WebSocket ClientsIRC Clients

To authenticate, your password (PASS) should be an OAuth token authorized through our API with the chat:read scope (to read messages) and chat:edit scope (to send messages).

Your nickname (NICK) must be your Twitch username (login name) in lowercase.

A successful connection session looks like this:

< PASS oauth:<Twitch OAuth token>
< NICK <user>
> 001 <user> :Welcome, GLHF!
> 002 <user> :Your host is
> 003 <user> :This server is rather new
> 004 <user> :-
> 375 <user> :-
> 372 <user> :You are in a maze of twisty passages.
> 376 <user> :>

About once every five minutes, the server will send you a PING To ensure that your connection to the server is not prematurely terminated, reply with PONG

If your connection fails for any reason, you will be disconnected from the server. Common reasons for failed connections are:

Command & Message Limits

There are limits of the number of IRC commands or messages you are allowed to send to the server. If you exceed these limits, you are locked out of chat for 30 minutes.

Limit Applies to …
20 per 30 seconds Users sending commands or messages to channels in which they do not have Moderator or Operator status
100 per 30 seconds Users sending commands or messages to channels in which they have Moderator or Operator status
50 per 30 seconds Known bots
7500 per 30 seconds Verified bots

For Whispers (private chat message between two users):

Limit Applies to …
3 per second, up to 100 per minute
40 accounts per day
Users (not bots)
10 per second, up to 200 per minute
500 accounts per day
Known bots
20 per second, up to 1200 per minute
100,000 accounts per day
Verified bots

Known and Verified Bots

There are two special statuses for bots which enhance the Twitch user experience and are trusted not to run rampant: known and verified. Both statuses provide elevated privileges. Verified bots have higher throughput than known bots. Verified status is granted only rarely.

Both known and verified bots:

To request known or verified bot status, please fill out the form at, as follows:

After the form is reviewed, you will be emailed the results, typically within 3 business days.

Invalid IRC Commands

If you send an invalid command, you will get a 421 message back:

< WHO #<channel>
> 421 <user> WHO :Unknown command

IRC Generic Capabilities

Capability Description
JOIN Join a channel.
PART Depart from a channel.
PRIVMSG Send a message to a channel.

JOIN (Generic)

Join a channel.

< JOIN #<channel>
> :<user>!<user>@<user> JOIN #<channel>
> :<user> 353 <user> = #<channel> :<user>
> :<user> 366 <user> #<channel> :End of /NAMES list

To receive membership state events (JOIN, MODE, NAMES, and PART) after a successful JOIN, you must request the Twitch-specific Membership capability.

If you try to join a suspended or deleted channel, you get a msg_channel_suspended NOTICE. If you try to join a nonexistent channel, the JOIN is quietly dropped.

PART (Generic)

Depart from a channel.

< PART #<channel>
> :<user>!<user>@<user> PART #<channel>

PRIVMSG (Generic)

Send a message to a channel.

< PRIVMSG #<channel> :This is a sample message
> :<user>!<user>@<user> PRIVMSG #<channel> :This is a sample message

Scopes for IRC Commands

CommandRequired Scope

/ban, /unban


/emoteonly, /emoteonlyoff


/followers, /followersoff


/host, /unhost


/mod, /unmod


/r9kbeta, /r9kbetaoff


/raid, /unraid


/slow, /slowoff


/subscribers, /subscribersoff


/timeout, /untimeout

/vip, /unvipchannel:moderate

Twitch IRC Capabilities

Using IRC v3 capability registration, you can register for Twitch-specific capabilities, to access Twitch-specific commands, data, etc.

Due to caching, events are not sent to a channel immediately; instead, they are batched up and sent every 10 seconds.

The Twitch API does not support WHO, part of the IRC specification.

All elevated users are given operator privileges. To determine a user’s actual elevation level, request the tags capability and parse the user-type tag.

There are several Twitch-specific capabilities: