OpenClaw Feishu / Lark Channel
Connect OpenClaw to Feishu (飞书) or Lark using WebSocket-based event subscription. This enterprise integration lets your AI assistant handle direct messages and group chats on Feishu/Lark — China's leading workplace collaboration platform by ByteDance. OpenClaw connects via the Feishu Open Platform's long-connection (WebSocket) mode, so no public URL or webhook endpoint is required. Just create a Feishu app, enter your App ID and App Secret, and your assistant is live.
Feishu / Lark Supported Features
Text Messages
Supported
Media & Files
Supported
Reactions
Not Supported
Threads
Not Supported
Voice Messages
Not Supported
Group Chat
Supported
Feishu / Lark Prerequisites
- A Feishu (feishu.cn) or Lark (larksuite.com) tenant account with app creation access
- The Feishu plugin installed: openclaw plugins install @openclaw/feishu
- OpenClaw Gateway running and configured
- Node.js 18+ installed on your server
Feishu / Lark Quick Setup
Create a Feishu/Lark app
Visit the Feishu Open Platform (open.feishu.cn/app) or Lark Developer Console (open.larksuite.com/app) for international tenants. Create a new enterprise app, set the name, description, and icon. Copy the App ID (format: cli_xxx) and App Secret from the Credentials page.
Configure permissions and bot capability
In the app's Permissions section, batch-import the required permissions. Enable the Bot capability under App Capability > Bot. In Event Subscription, select 'Use long connection' (WebSocket mode) and add the 'im.message.receive_v1' event. Publish the app through Version Management & Release.
Add Feishu channel config to OpenClaw
Run 'openclaw channels add' and select Feishu, or manually add the channel configuration to ~/.openclaw/openclaw.json with your appId and appSecret. You can also use environment variables FEISHU_APP_ID and FEISHU_APP_SECRET.
Start Gateway and test
Run 'openclaw gateway' to start the service. Send a direct message to your bot in Feishu. If using the default pairing policy, approve the sender via 'openclaw pairing approve feishu <code>' in your terminal.
Feishu / Lark Configuration Example
{
"channels": {
"feishu": {
"enabled": true,
"dmPolicy": "pairing",
"accounts": {
"main": {
"appId": "cli_xxx",
"appSecret": "YOUR_APP_SECRET",
"botName": "My AI Assistant"
}
}
}
}
}Feishu / Lark Deep Dive
Architecture Overview
Feishu App Setup & Credentials
# Via environment variables
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="your_app_secret"
# Or via CLI wizard
openclaw channels addFeishu vs Lark Configuration
{
"channels": {
"feishu": {
"domain": "lark",
"accounts": {
"main": {
"appId": "cli_xxx",
"appSecret": "YOUR_APP_SECRET"
}
}
}
}
}DM Policies
{
"channels": {
"feishu": {
"dmPolicy": "allowlist",
"allowFrom": ["ou_xxx", "ou_yyy"]
}
}
}Group Chat Management
{
"channels": {
"feishu": {
"groupPolicy": "open",
"requireMention": true
}
}
}Streaming Replies via Interactive Cards
{
"channels": {
"feishu": {
"streaming": true
}
}
}Message Types & Media Support
{
"channels": {
"feishu": {
"mediaMaxMb": 30,
"textChunkLimit": 2000
}
}
}Multiple Accounts & Multi-Agent Routing
{
"channels": {
"feishu": {
"accounts": {
"support": {
"appId": "cli_aaa",
"appSecret": "secret_a",
"botName": "Support Bot"
},
"hr": {
"appId": "cli_bbb",
"appSecret": "secret_b",
"botName": "HR Bot"
}
}
}
}
}Useful Commands
Feishu / Lark Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Enable or disable the Feishu channel |
| domain | string | "feishu" | API domain: 'feishu' for domestic (feishu.cn) or 'lark' for international (larksuite.com) |
| dmPolicy | string | "pairing" | Controls who can DM the bot. Options: pairing, allowlist, open, disabled |
| allowFrom | string[] | [] | Open IDs (ou_xxx) allowed to message the bot when dmPolicy is 'allowlist' |
| groupPolicy | string | "open" | Group chat policy. Options: open, allowlist, disabled |
| requireMention | boolean | true | Whether the bot requires @mention to respond in group chats |
| streaming | boolean | true | Enable streaming AI responses via interactive cards |
| textChunkLimit | number | 2000 | Maximum characters per text message chunk |
| mediaMaxMb | number | 30 | Maximum media file size in megabytes for uploads and downloads |
| accounts.<id>.appId | string | "" | Feishu App ID (format: cli_xxx) from the Open Platform console |
| accounts.<id>.appSecret | string | "" | Feishu App Secret from the Open Platform console |
| accounts.<id>.botName | string | "" | Display name of the bot in Feishu chats |
| historyLimit | number | 50 | Number of recent messages to include as AI context |
Enable or disable the Feishu channel
API domain: 'feishu' for domestic (feishu.cn) or 'lark' for international (larksuite.com)
Controls who can DM the bot. Options: pairing, allowlist, open, disabled
Open IDs (ou_xxx) allowed to message the bot when dmPolicy is 'allowlist'
Group chat policy. Options: open, allowlist, disabled
Whether the bot requires @mention to respond in group chats
Enable streaming AI responses via interactive cards
Maximum characters per text message chunk
Maximum media file size in megabytes for uploads and downloads
Feishu App ID (format: cli_xxx) from the Open Platform console
Feishu App Secret from the Open Platform console
Display name of the bot in Feishu chats
Number of recent messages to include as AI context
Feishu / Lark Frequently Asked Questions
Feishu / Lark Troubleshooting
The bot may not be added to the group, @mention is not working, or groupPolicy is set to 'disabled'.
The app may not be published, event subscription is not configured, or permissions are missing.
The im:message:send_as_bot permission may not be granted, or the app hasn't been published.
The App Secret was accidentally committed to version control or shared insecurely.
Network instability or firewall interfering with long-lived WebSocket connections.