How to Connect Openclaw to Twitch
Quick Start
Integrating Openclaw with Twitch lets you run an AI-powered bot in your Twitch chat. This guide walks you through installing the plugin and configuring your bot to connect via IRC.
For more deployment options, check out our guide on Deploy Flyio Openclaw. If you're new to Openclaw, you might also want to read about Elevated Mode Openclaw for advanced permissions.
Step 1: Install the Twitch Plugin
Twitch support is provided via an IRC connection using a plugin that is not bundled with the core install. First, install it using the CLI:
Openclaw plugins install @Openclaw/twitch
Step 2: Configure Your Credentials
Edit your ~/.Openclaw/Openclaw.json file to include the twitch channel configuration. You must specify the bot's username, credentials, the target channel to join, and access controls.
{
"channels": {
"twitch": {
"enabled": true,
"username": "your_bot_username",
"accessToken": "oauth:abc123...",
"clientId": "xyz789...",
"channel": "target_chat_room",
"allowFrom": ["123456789"]
}
}
}
Note: Replace 123456789 with your actual numeric Twitch User ID. If you prefer role-based access instead of a strict allowlist, you can omit allowFrom and use "allowedRoles": ["moderator", "vip"] instead.
Step 3: Get Your Twitch Credentials
- Go to Twitch Token Generator to create an OAuth token
- Get your clientId from the Twitch Developer Console
- Find your numeric User ID using a tool like Twitch User ID Lookup
Step 4: Restart and Test
After saving your configuration, restart the Openclaw gateway:
Openclaw gateway restart
Your bot should now appear in your Twitch chat and respond to messages based on your configured policies.
Troubleshooting & Best Practices
- Connection failures: Verify your OAuth token starts with oauth: and hasn't expired
- Bot not responding: Check that the channel name matches exactly (case-sensitive)
- Permission denied: Ensure your User ID is correctly added to allowFrom
- Rate limiting: Twitch IRC has strict rate limits; avoid spammy responses
Now your Openclaw bot is live on Twitch, ready to assist your community with AI-powered responses.