| title | Feishu Integration |
|---|---|
| nav_title | Feishu |
| description | Create a Feishu bot from the official template and drive Desktop sessions from a private chat with card-based approval. |
| order | 1 |
Best for teams already on Feishu: an official template creates a bot with every required permission preconfigured, and permission requests arrive as interactive cards you can tap. Common commands can be exposed as a bot menu. It handles private (p2p) chats only, and changing the bot configuration means publishing a new version in the developer console.
Open Create a Feishu bot. This is the official OpenClaw template, with messaging, event subscription, and card callback permissions already granted — no scopes to add by hand. The Create Feishu bot button under Settings → IM Adapters → Feishu opens the same page.
Choose a name, create the app, then keep its App ID and App Secret for the next step.
This step is optional. With a menu, you can switch projects and start sessions by tapping instead of typing.
In the Feishu developer console, open your bot and go to its bot menu configuration. Add three entries, each with a label of your choice and one of these commands:
/projects— list recent projects and switch/new— start a new session/clear— clear the current context
Save the menu, then publish a new application version. Menu changes take effect only after publishing.
- Open Settings → IM Adapters and select the Feishu tab.
- Paste the values into App ID and App Secret.
- Leave Encrypt Key and Verification Token empty; the template bot does not need them.
- Enable Streaming Card Mode if you want long replies to update one card in place.
- Select Save.
Allowed Users can stay empty. When it is, only paired accounts are accepted, which is usually what you want.
At the top of the page, under Pairing, select Generate Code. The six-character code is written to local configuration immediately — no separate save.
Send any message to your new bot in Feishu, then send the code when prompted. Once pairing is confirmed you can talk to Claude Code directly.
Codes are valid for 60 minutes, work once, and are invalidated when a new one is generated.
Alongside the menu buttons, these work in the chat box at any time:
/helpor帮助/statusor状态/projectsor项目列表/newor新会话/clearor清空/stopor停止
Permission requests arrive as interactive cards. Selecting allow or deny returns the result to the pending Desktop session.
Normal replies use Feishu post messages. Streaming output prefers patching the same message, and long completed text is split to respect platform limits.
Packaged Desktop starts the sidecar automatically. Run it by hand only when working from source:
cd adapters
bun install
bun run feishuOptional overrides:
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
export ADAPTER_SERVER_URL="ws://127.0.0.1:3456"No messages arrive. Confirm the app is published — menu edits require a new version — and that the conversation is a private chat rather than a group.
Card buttons do nothing. The card action capability usually did not ship with the published version. Publish again from the developer console.
Still unauthorized. Check that the code is within its 60-minute window, that it is the current one, and that the account now appears under Paired Users in Desktop.
Session not restored after a restart. Verify that ~/.claude/adapter-sessions.json is writable and that the session still exists in Desktop.
adapters/feishu/index.ts, plus pairing.ts, session-store.ts, ws-bridge.ts, and http-client.ts under adapters/common/.