packages/docs/plugin-registry/platform/twitch.md
The Twitch plugin connects Eliza agents to Twitch, enabling chat messaging and channel interaction.
Package: @elizaos/plugin-twitch
eliza plugins install @elizaos/plugin-twitch
{
"connectors": {
"twitch": {
"accessToken": "your-twitch-access-token",
"clientId": "your-twitch-client-id"
}
}
}
Or use environment variables:
export TWITCH_ACCESS_TOKEN=your-twitch-access-token
export TWITCH_CLIENT_ID=your-twitch-client-id
The plugin auto-enables when any of these are present:
accessToken in connector configclientId in connector configenabled: true in connector config| Field | Required | Description |
|---|---|---|
accessToken | Yes* | Twitch OAuth access token |
clientId | Yes* | Twitch application Client ID |
clientSecret | No | Twitch client secret |
refreshToken | No | Refresh token for token renewal |
username | No | Twitch username for the bot |
channel | No | Primary channel name to join |
channels | No | Additional channel names to join |
requireMention | No | Only respond when mentioned |
allowedRoles | No | Comma-separated allowed roles |
enabled | No | Force-enable without credentials |
* At least one of accessToken, clientId, or enabled: true is required.
| Variable | Required | Description |
|---|---|---|
TWITCH_ACCESS_TOKEN | Yes | Twitch OAuth access token (primary auto-enable trigger) |
TWITCH_CLIENT_ID | No | Twitch application Client ID |
TWITCH_CLIENT_SECRET | No | Twitch client secret |
TWITCH_REFRESH_TOKEN | No | Refresh token for token renewal |
TWITCH_USERNAME | No | Twitch username for the bot |
TWITCH_CHANNEL | No | Primary channel name to join |
TWITCH_CHANNELS | No | Additional channel names to join |
TWITCH_ALLOWED_ROLES | No | Comma-separated allowed roles |
TWITCH_REQUIRE_MENTION | No | Only respond when mentioned |
For live-streaming output to Twitch, enable @elizaos/plugin-streaming and set TWITCH_STREAM_KEY (and optional streaming.twitch in config). See Streaming for setup details.