OpenClaw on Feishu and Lark
Connect OpenClaw to a Feishu or Lark app bot by hand, start the gateway, and approve pairing.
This page connects OpenClaw, running on a computer, to a Feishu or Lark app bot. It follows OpenClaw setup. To message Cue from Feishu or Lark without OpenClaw, use Feishu and Lark, which connects through Cue CLI.
These steps are manual and have not been checked end to end on Cue OS. On current Cue computers, openclaw channels list --all shows Feishu as not installed, so this setup will not work there until the Feishu plugin is added. openclaw plugins install @openclaw/feishu may add it; that was not tested. Cue also already runs the OpenClaw gateway on port 18789 on those computers, so the start commands below use --force to replace it.
1. Create the app
On the Feishu Open Platform (for China tenants) or the Lark Open Platform (for international tenants):
- Create an app (创建应用).
- Add the bot capability (添加应用能力 → 机器人).
- Copy the App ID and App Secret.
Treat the App Secret like a password.
Permissions
This broad set was used in earlier OpenClaw setups. It was not checked for this page, and it is not a minimal list. You can import it in one step:
{
"scopes": {
"tenant": [
"aily:file:read",
"aily:file:write",
"application:application.app_message_stats.overview:readonly",
"application:application:self_manage",
"application:bot.menu:write",
"cardkit:card:read",
"cardkit:card:write",
"contact:user.employee_id:readonly",
"corehr:file:download",
"event:ip_list",
"im:chat.access_event.bot_p2p_chat:read",
"im:chat.members:bot_access",
"im:message",
"im:message.group_at_msg:readonly",
"im:message.p2p_msg:readonly",
"im:message:readonly",
"im:message:send_as_bot",
"im:resource"
],
"user": [
"aily:file:read",
"aily:file:write",
"im:chat.access_event.bot_p2p_chat:read"
]
}
}2. Add the app to OpenClaw
openclaw config set channels.feishu.enabled true --json
openclaw config set channels.feishu.appId "<FEISHU_APP_ID>"
openclaw config set channels.feishu.appSecret "<FEISHU_APP_SECRET>"
openclaw config set channels.feishu.domain "feishu"
openclaw config set channels.feishu.connectionMode "websocket"
openclaw config set channels.feishu.requireMention true --json
openclaw config set channels.feishu.dmPolicy pairing
openclaw config set channels.feishu.groupPolicy openIf you use Lark instead of Feishu:
openclaw config set channels.feishu.domain "lark"3. Start the gateway
mkdir -p ~/.openclaw/logs
nohup openclaw gateway --force > ~/.openclaw/logs/gateway-sandbox.log 2>&1 &
sleep 4Check the gateway:
openclaw gateway status
tail -n 60 ~/.openclaw/logs/gateway-sandbox.logWhat you want to see:
Connectivity probe: ok- a log line showing the Feishu channel started
openclaw gateway status also reports the background service as disabled. That is expected on a computer without a background service manager.
4. Turn on event delivery
After the gateway connects for the first time, go back to your app in the developer console:
- In Events and Callbacks (事件与回调), set the subscription mode to Receive events through persistent connection (使用长连接接收事件/回调). This option appears only after the first connection.
- Add the event im.message.receive_v1 (接收消息). Without it, the bot connects but never receives messages.
- Under Permissions (权限管理), check that im:message:receive_v1 (读取用户发给机器人的消息) is approved.
- Publish the app (版本管理与发布). An unpublished app cannot receive events.
Then restart the gateway:
nohup openclaw gateway --force > ~/.openclaw/logs/gateway-sandbox.log 2>&1 &
sleep 45. Approve pairing
By default, a Feishu user the bot does not know gets a pairing code. Approve it on the computer:
openclaw pairing approve feishu <PAIRING_CODE>Then message the bot again.
Feishu access and model access are separate. If Feishu connects but the bot does not give real replies, finish Model auth.
If Feishu accepts messages but OpenClaw cannot reply, check the permissions again, especially im:message:send_as_bot, im:message:readonly, and im:chat.members:bot_access.
Next: Model auth.