Channels
How to Connect OpenClaw to Feishu (Lark)
Browse more in Channels.
All channels guides →This guide walks you through connecting OpenClaw to Feishu (Lark) so your agents can chat with users in DMs and group channels. You will use the built-in Feishu channel, configure DM and group access control, and wire up multi-agent routing where needed.
By the end, your OpenClaw gateway will be talking to real Feishu users over a production-ready WebSocket connection.
Prerequisites
- ✓OpenClaw 2026.4.10 or above — run `openclaw --version` and upgrade with `openclaw update` if needed.
- ✓An existing OpenClaw gateway installation with the `openclaw` CLI available on your PATH.
- ✓A Feishu or Lark workspace where you can create and publish a bot in Feishu Open Platform / Lark Developer.
- ✓Permission in your Feishu/Lark tenant to grant the bot scopes and enable event subscriptions, including `im.message.receive_v1`.
Steps
- 1
Verify your OpenClaw version
Feishu support requires a minimum OpenClaw version, so confirm this before you spend time wiring up bots. If you are on an older release, upgrade first so the Feishu channel and commands behave as documented.
bashopenclaw --version openclaw update - 2
Run the Feishu channel setup wizard
Use the built-in channel login flow to create and connect a Feishu/Lark bot to your gateway. The wizard handles app creation and credentials; you authenticate by scanning a QR code from your mobile app.
bashopenclaw channels login --channel feishu - 3
Restart the OpenClaw gateway to apply Feishu settings
After the wizard writes channel configuration, restart the gateway so it picks up the new Feishu account and connection mode. Skipping this restart is a common reason the bot appears connected in Feishu but never responds.
bashopenclaw gateway restart - 4
Configure direct message access control
Decide who can DM your Feishu bot by setting the `dmPolicy` and, if needed, approving pairing codes. Pairing mode is useful when you want explicit approval for each new user instead of opening DMs to the whole tenant.
bashopenclaw pairing list feishu openclaw pairing approve feishu <CODE> - 5
Tune group chat behavior and mention requirements
Control where the bot responds in group chats with `groupPolicy` and whether it needs an @mention. Start with an allowlist in busy tenants, then relax to open groups once you are confident the bot behaves well.
json{ channels: { feishu: { groupPolicy: "allowlist", // Group IDs look like: oc_xxx groupAllowFrom: ["oc_xxx", "oc_yyy"], }, }, } - 6
Restrict which users can trigger the bot inside a group
For sensitive rooms, you can allow the bot in a group but restrict which senders it listens to. This is handy when you want a small operator set to control the agent while everyone else can read the replies.
json{ channels: { feishu: { groupPolicy: "allowlist", groupAllowFrom: ["oc_xxx"], groups: { oc_xxx: { // User open_ids look like: ou_xxx allowFrom: ["ou_user1", "ou_user2"], }, }, }, }, } - 7
Look up Feishu group and user IDs for routing
You will need concrete `chat_id` and `open_id` values to build allowlists and bindings. Grab group IDs from the Feishu UI and user IDs from gateway logs or pairing requests so your config targets real entities.
bashopenclaw logs --follow openclaw pairing list feishu - 8
Enable streaming replies and quota optimizations
Feishu supports streaming via interactive cards, which keeps long answers responsive. You can also disable typing indicators and sender name resolution to reduce API calls if you are close to quota limits.
json{ channels: { feishu: { streaming: true, // enable streaming card output (default: true) blockStreaming: true, // enable block-level streaming (default: true) }, }, } { channels: { feishu: { typingIndicator: false, resolveSenderNames: false, }, }, } - 9
Route Feishu conversations to specific agents
Use bindings to send different Feishu DMs and groups to different OpenClaw agents. This lets you run, for example, a coding assistant for one user and a support bot in a specific group, all through the same gateway.
json{ agents: { list: [ { id: "main" }, { id: "agent-a", workspace: "/home/user/agent-a" }, { id: "agent-b", workspace: "/home/user/agent-b" }, ], }, bindings: [ { agentId: "agent-a", match: { channel: "feishu", peer: { kind: "direct", id: "ou_xxx" }, }, }, { agentId: "agent-b", match: { channel: "feishu", peer: { kind: "group", id: "oc_zzz" }, }, }, ], }
Configuration
| Option | Description | Example |
|---|---|---|
| channels.feishu.enabled | Turns the Feishu channel on or off in the gateway. | true |
| channels.feishu.domain | Selects whether the bot talks to Feishu or Lark APIs. | feishu |
| channels.feishu.connectionMode | Controls whether events arrive over WebSocket or webhook. | websocket |
| channels.feishu.defaultAccount | Specifies which Feishu account to use when outbound APIs do not set an accountId. | default |
| channels.feishu.verificationToken | Verification token required when you run Feishu in webhook mode. | vtoken_123456 |
| channels.feishu.encryptKey | Encryption key Feishu uses to sign and encrypt webhook payloads. | encrypt_key_abc123 |
| channels.feishu.webhookPath | HTTP path where the gateway listens for Feishu webhook events. | /feishu/events |
| channels.feishu.webhookHost | Host interface the Feishu webhook server binds to. | 127.0.0.1 |
| channels.feishu.webhookPort | Port the Feishu webhook server listens on. | 3000 |
| channels.feishu.accounts.<id>.appId | Feishu app ID for a specific account slot. | cli_xxx |
| channels.feishu.accounts.<id>.appSecret | Feishu app secret for a specific account slot. | xxx |
| channels.feishu.accounts.<id>.domain | Overrides the API domain per account if you mix Feishu and Lark. | feishu |
| channels.feishu.dmPolicy | Controls who can DM the bot (pairing, allowlist, open, or disabled). | allowlist |
| channels.feishu.allowFrom | List of user open_ids allowed to DM the bot when dmPolicy is allowlist. | ["ou_user1", "ou_user2"] |
| channels.feishu.groupPolicy | Controls which groups the bot responds in (open, allowlist, or disabled). | allowlist |
| channels.feishu.groupAllowFrom | List of group chat_ids where the bot is allowed to respond when groupPolicy is allowlist. | ["oc_xxx", "oc_yyy"] |
| channels.feishu.requireMention | Requires an @mention before the bot responds in group chats. | true |
| channels.feishu.groups.<chat_id>.requireMention | Overrides the mention requirement for a specific group. | false |
| channels.feishu.groups.<chat_id>.enabled | Enables or disables the bot in a specific group. | true |
| channels.feishu.textChunkLimit | Maximum size of each outbound text chunk in characters. | 2000 |
| channels.feishu.mediaMaxMb | Maximum media upload or download size in megabytes. | 30 |
| channels.feishu.streaming | Enables streaming card output for replies. | true |
| channels.feishu.blockStreaming | Enables block-level streaming updates for interactive cards. | true |
| channels.feishu.typingIndicator | Controls whether the bot sends typing reactions. | true |
| channels.feishu.resolveSenderNames | Controls whether the gateway looks up sender display names. | true |
| channels.feishu.defaultAccount | Determines which Feishu account is used when outbound APIs omit accountId. | main |
| channels.feishu.accounts.main.appId | App ID for the primary Feishu bot account. | cli_xxx |
| channels.feishu.accounts.main.appSecret | App secret for the primary Feishu bot account. | xxx |
| channels.feishu.accounts.main.name | Human-readable name for the primary Feishu bot account. | Primary bot |
| channels.feishu.accounts.backup.appId | App ID for a backup Feishu bot account. | cli_yyy |
| channels.feishu.accounts.backup.appSecret | App secret for a backup Feishu bot account. | yyy |
| channels.feishu.accounts.backup.name | Human-readable name for the backup Feishu bot account. | Backup bot |
| channels.feishu.accounts.backup.enabled | Controls whether the backup Feishu bot account is active. | false |
Troubleshooting
Bot does not respond in group chats
requireMention` defaults to true. Then verify `groupPolicy` is not set to `"disabled"` and tail the gateway logs to see if messages are arriving and being filtered.
openclaw logs --followBot does not receive messages
receive_v1`, and the event delivery mode is set to persistent connection (WebSocket). Also confirm the gateway is running and then watch the logs while you send a test message.
openclaw gateway status
openclaw logs --followApp Secret leaked
appSecret` in your config, and restart the gateway so the new secret is used.
openclaw gateway restartFrequently asked questions
Powered by Mem0
Add persistent memory to OpenClaw
Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.