Feishu / Lark
The Feishu driver receives messages via an HTTP webhook pushed by Feishu's event system and sends via the Feishu IM v1 API using lark-oapi.
Feishu (China) and Lark (international) use the same API and the same driver.
Setup
- Go to the Feishu Open Platform (or Lark Developer).
- Create a custom app and enable the im:message:receive_v1 event.
- Under Event Subscriptions, set the request URL to
http://your-host:8080/event(matching yourlisten_portandlisten_path). - Copy the App ID, App Secret, Verification Token, and Encrypt Key (leave encrypt key blank to disable encryption).
- Add the bot to the target group chat.
Public endpoint required
Feishu must be able to reach your HTTP endpoint from the internet. Use a reverse proxy, tunnel (e.g. ngrok), or deploy on a public server.
Config keys
Add under feishu.<instance_id> in config.json:
| Key | Required | Default | Description |
|---|---|---|---|
app_id | Yes | — | Feishu/Lark App ID |
app_secret | Yes | — | Feishu/Lark App Secret |
verification_token | No | "" | Event verification token from the developer console |
encrypt_key | No | "" | Event encryption key (leave empty to disable) |
listen_port | No | 8080 | HTTP port to listen on for incoming events |
listen_path | No | "/event" | HTTP path for incoming events |
json
{
"feishu": {
"fs_main": {
"app_id": "cli_xxxxxxxxxxxx",
"app_secret": "your_app_secret",
"verification_token": "your_verification_token",
"encrypt_key": "",
"listen_port": 8080,
"listen_path": "/event"
}
}
}Rule channel keys
Use under channels or from/to in rules.json:
| Key | Description |
|---|---|
chat_id | Feishu open chat ID, e.g. "oc_xxxxxxxxxxxxxxxxxx" |
json
{
"fs_main": { "chat_id": "oc_xxxxxxxxxxxxxxxxxx" }
}You can find the chat ID in the Feishu developer console, or from the event payload of any message sent to the bot in that chat.
Notes
- Currently only text messages are received. Other message types (cards, files, stickers) are ignored on the receive side.
- Outgoing attachments are sent as URLs appended to the message text (Feishu file upload via the API requires additional permissions).
- The sender's display name is shown as their
open_id. Resolving the human-readable name requires an extra user-info API call and is not currently implemented.