docs/users/features/channels/feishu.md
This guide covers setting up a Qwen Code channel on Feishu (飞书) / Lark.
im.message.receive_v1 (接收消息)Enable the following permissions under Permissions & Scopes (权限管理):
im:message — Read and send messagesim:message:send_as_bot — Send messages as botim:resource — Access message resources (images, files)After configuring permissions and events, create a version and publish it. The bot won't work until the application is published and approved.
Add the channel to ~/.qwen/settings.json:
{
"channels": {
"my-feishu": {
"type": "feishu",
"clientId": "<your-app-id>",
"clientSecret": "<your-app-secret>",
"senderPolicy": "open",
"sessionScope": "user",
"cwd": "/path/to/your/project",
"groupPolicy": "open",
"collapsible": true,
"groups": {
"*": { "requireMention": true }
}
}
}
}
| Option | Description |
|---|---|
clientId | Feishu App ID |
clientSecret | Feishu App Secret |
collapsible | Collapse long responses into expandable sections (default: false) |
collapsibleThreshold | Character threshold for collapsing (default: 500) |
webhookPort | If set, use HTTP webhook mode instead of WebSocket |
verificationToken | Verification token for webhook mode |
encryptKey | Encrypt key for webhook mode |
# Start only the Feishu channel
qwen channel start my-feishu
# Or start all configured channels together
qwen channel start
Open Feishu and send a message to the bot. You should see a streaming interactive card with the response.
WebSocket mode uses an outbound long connection — no public URL or server is needed. This is the recommended mode for most deployments.
If you need webhook mode (e.g., for shared applications), set webhookPort in your config:
{
"channels": {
"my-feishu": {
"type": "feishu",
"webhookPort": 9321,
"verificationToken": "<from-feishu-console>",
"encryptKey": "<from-feishu-console>"
}
}
}
Then set the request URL in Feishu Open Platform to http://<your-server>:9321.
Feishu bots work in both DM and group conversations. To enable group support:
groupPolicy to "allowlist" or "open" in your channel configBy default, the bot requires an @mention in group chats (requireMention: true). Set "requireMention": false for a specific group to make it respond to all messages.
Responses are rendered as Feishu interactive cards with real-time streaming updates. The card shows a "generating" indicator while the response is being produced, and a Stop button to cancel generation.
When you reply to (quote) a message, the quoted content is automatically included as context for the agent. This works for:
You can send photos and documents to the bot:
Multiple users can send messages simultaneously in the same group chat. Each message gets its own independent card and response — they don't interfere with each other.
@larksuiteoapi/node-sdk — same outbound-only model, no public URL neededim.message.receive_v1 event is subscribedgroupPolicy is set to "allowlist" or "open" (default is "disabled")card_msg_content_type=user_card_content API parameterim:message permission to read messages