packages/docs/connectors/twitch.md
Connect your agent to Twitch for live chat monitoring, channel events, and audience interactions using the @elizaos/plugin-twitch package.
| Name | Required | Description |
|---|---|---|
TWITCH_ACCESS_TOKEN | Yes | Twitch OAuth access token with chat scopes |
TWITCH_CLIENT_ID | No | Twitch application Client ID |
TWITCH_CLIENT_SECRET | No | Twitch client secret |
TWITCH_REFRESH_TOKEN | No | Refresh token for automatic token renewal |
TWITCH_USERNAME | No | Twitch username for the bot |
TWITCH_CHANNEL | No | Primary channel name to join |
TWITCH_CHANNELS | No | Comma-separated list of additional channel names to join |
TWITCH_ALLOWED_ROLES | No | Comma-separated list of allowed roles |
TWITCH_REQUIRE_MENTION | No | Only respond when mentioned |
The connector auto-enables when accessToken, clientId, or enabled: true is set in the connector config.
Configure in ~/.eliza/eliza.json:
{
"connectors": {
"twitch": {
"clientId": "YOUR_CLIENT_ID",
"accessToken": "YOUR_ACCESS_TOKEN"
}
}
}
To disable:
{
"connectors": {
"twitch": {
"clientId": "YOUR_CLIENT_ID",
"accessToken": "YOUR_ACCESS_TOKEN",
"enabled": false
}
}
}
The plugin-auto-enable.ts module checks connectors.twitch in your config. The connector auto-enables when accessToken or clientId is truthy, or when enabled is explicitly true. Setting enabled: false disables auto-enable regardless of other fields.
No environment variable is required to trigger auto-enable — it is driven entirely by the connector config object.
| Variable | Required | Description |
|---|---|---|
TWITCH_ACCESS_TOKEN | Yes | Twitch OAuth access token with chat scopes |
TWITCH_CLIENT_ID | No | Twitch application Client ID |
TWITCH_CLIENT_SECRET | No | Twitch client secret |
TWITCH_REFRESH_TOKEN | No | Refresh token for automatic token renewal |
TWITCH_USERNAME | No | Twitch username for the bot |
TWITCH_CHANNEL | No | Primary channel name to join |
TWITCH_CHANNELS | No | Comma-separated list of additional channels to join |
TWITCH_ALLOWED_ROLES | No | Comma-separated list of roles allowed to interact |
TWITCH_REQUIRE_MENTION | No | Only respond when @mentioned |
connectors.twitch in your config or set the environment variablesAll fields are defined under connectors.twitch in eliza.json.
| Field | Type | Default | Description |
|---|---|---|---|
clientId | string | — | Twitch application Client ID |
accessToken | string | — | OAuth access token with chat scopes |
clientSecret | string | — | Twitch client secret |
refreshToken | string | — | Refresh token for token renewal |
username | string | — | Twitch username for the bot |
channel | string | — | Primary channel name to join |
channels | string[] | — | Additional channel names to join |
requireMention | boolean | — | Only respond when mentioned |
allowedRoles | string[] | — | Comma-separated allowed roles |
enabled | boolean | — | Explicitly enable/disable |