Feishu
Feishu access uses Feishu Open Platform long connection event subscriptions. Users can DM or mention the bot to query status, send commands, or ask device questions; text, rich text, images, and voice are supported, with ASR required for voice.
Usage Modes
| Mode | Trigger | Notes |
|---|---|---|
| Bot DM | Send a message directly to the bot | Good for personal status queries and control commands. |
| Group mention | Mention the bot in a group chat and enter a question | Good for team collaboration around devices. |
| Image message | Send an image, optionally with text | Images enter the Device Agent as visual input. |
| Voice message | Send a voice message | Requires ASR configuration. Voice is transcribed before entering the conversation. |
Prepare the Feishu App
- Create an internal app in Feishu Open Platform.
- Add bot capability.
- Copy
App IDandApp Secretfrom credentials and basic information. - Enable event subscription through long connection mode.
- Subscribe to
im.message.receive_v1. - Grant the permissions required for reading messages and sending bot replies.
- Publish the app and add the bot to the DMs or groups where it will be used.
If event subscription uses encryption or verification token checks, keep Encrypt Key and Verification Token and enter them in the Device Agent console.
Configure Device Agent
Open Settings → Channels → Feishu and fill in:
| Field | .env | Description |
|---|---|---|
| Enabled | FEISHU_ENABLED | Starts the Feishu channel |
| App ID | FEISHU_APP_ID | Feishu app App ID, usually cli_xxx |
| App Secret | FEISHU_APP_SECRET | Feishu app secret |
| Encrypt Key | FEISHU_ENCRYPT_KEY | Optional. Required when encrypted event subscription is enabled |
| Verification Token | FEISHU_VERIFICATION_TOKEN | Optional. Required when token verification is configured |
| Allow list | FEISHU_ALLOW_FROM | Optional Feishu user open_id allow list |
You can also configure it in .env:
bash
FEISHU_ENABLED=true
FEISHU_APP_ID=cli_xxxxxxxxxxxxx
FEISHU_APP_SECRET=xxxxxxxxxxxxxxxx
FEISHU_ENCRYPT_KEY=
FEISHU_VERIFICATION_TOKEN=
FEISHU_ALLOW_FROM=ou_xxx,ou_yyyRestart the service after saving.
Verify Access
- Confirm the service has restarted.
- Check logs for
Feishu: enabledandfeishu channel started (WebSocket). - Send a DM to the bot, or mention the bot in a group.
- If the allow list is enabled, make sure the sender
open_idis included.
In group chats, mention the bot. In DMs, send messages directly. Image messages enter the Device Agent as visual input. Voice messages are transcribed before entering the conversation.
Checks
- No reply: confirm the app is published, the bot is in the chat, and long connection event subscription is enabled.
- Token verification fails: confirm
Verification Tokenmatches the Feishu console. - Encrypted messages fail: confirm
Encrypt Keymatches exactly, with no extra spaces. - Voice is not transcribed: enable an ASR service in Configuration.