Feishu / Lark
Feishu adapter using Webhook mode with event subscription and encrypted validation.
Prerequisites
- Create a self-hosted app on Feishu Open Platform, enable the Bot capability.
- Grant scopes:
im:message,im:message.group_at_msg,im:resource. - Configure Event Subscription (Event 2.0):
- Event:
im.message.receive_v1 - Request URL:
https://<your-public-host>/feishu
- Event:
Environment
export FEISHU_APP_ID=cli_...export FEISHU_APP_SECRET=...export FEISHU_VERIFICATION_TOKEN=...export FEISHU_WEBHOOK_HOST=0.0.0.0export FEISHU_WEBHOOK_PORT=16666export FEISHU_WEBHOOK_PATH=/feishuPublic exposure
Expose ${HOST}:${PORT}${PATH} via reverse proxy (nginx / Cloudflare Tunnel / frp).
Thread semantics
Feishu thread_id (topic reply) is thread key; plain messages use chat_id.
Current state
Text MVP (.env.example). Text messaging is complete; images and files use Feishu’s /open-apis/im/v1/images and /files. Rich cards not yet supported.
Troubleshooting
- Webhook validation fails:
FEISHU_VERIFICATION_TOKENmust match the Open Platform value exactly. - Messages sent but invisible: check the app’s visibility scope.
- Replies truncated: single message ≤ 30,000 chars; OpenCorvus auto-splits.