Connect Feishu (Lark) Bot
How to configure and connect a Feishu (Lark) bot to Buda for real-time AI conversations.
Connect Feishu (Lark) Bot
Buda natively supports Feishu bots via persistent WebSocket connections. No public webhook URL or tunneling required — just provide your App ID and App Secret.
Lark (international) tenants: use https://open.larksuite.com/app and set
domain: "lark"in your config.
Step 1: Create a Feishu App
1.1 Open Feishu Open Platform
Visit Feishu Open Platform and sign in.
1.2 Create an enterprise app
- Click Create enterprise app
- Fill in the app name, description, and icon
- Click Create

1.3 Copy credentials
From Credentials & Basic Info, copy:
App ID: cli_xxxxxxxxxxxx
App Secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxApp Secret is hidden by default — click "View" to reveal it. Keep it private.

1.4 Configure permissions
In Permissions, click Batch import and paste:
{
"scopes": {
"tenant": [
"aily:file:read",
"aily:file:write",
"application:application.app_message_stats.overview:readonly",
"application:application:self_manage",
"application:bot.menu:write",
"cardkit:card:read",
"cardkit:card:write",
"contact:user.employee_id:readonly",
"corehr:file:download",
"event:ip_list",
"im:chat.access_event.bot_p2p_chat:read",
"im:chat.members:bot_access",
"im:message",
"im:message.group_at_msg:readonly",
"im:message.p2p_msg:readonly",
"im:message:readonly",
"im:message:send_as_bot",
"im:resource"
],
"user": ["aily:file:read", "aily:file:write", "im:chat.access_event.bot_p2p_chat:read"]
}
}
1.5 Publish the app (first time)
You must publish before enabling event subscriptions.
- Go to Version Management & Release → Create Version
- Set version to
1.0.0, click Save → Submit for release - Wait for approval (enterprise apps usually auto-approve)
Step 2: Configure the channel in Buda
Open Buda's Channel settings, select Feishu, enter your App ID and App Secret, and save.
Buda immediately establishes a WebSocket long connection to Feishu in the background.
⚠️ Complete this step before configuring event subscriptions — Feishu needs to detect the active connection first.
Step 3: Enable event subscription
- Go to Event Subscription → Event Configuration
- Enable Use long connection to receive events
- Click Add Event and add
im.message.receive_v1 - Click Save

⚠️ If the long connection toggle is grayed out, the app hasn't been published yet. Complete step 1.5 first.
Step 4: Publish a new version
After adding events, publish a new version for changes to take effect:
- Version Management & Release → Create Version, increment the version (e.g.
1.0.1) - Click Save → Submit for release
Step 5: Test
- Open Feishu and find your bot
- Send a message, e.g.
Hello - The bot replies — you're all set 🎉
Troubleshooting
Bot does not respond
| Possible cause | Solution |
|---|---|
| Event not added | Check that im.message.receive_v1 is added |
| Missing permissions | Review step 1.4 |
| Wrong credentials | Verify App ID and App Secret in Buda |
| Version not published | Publish a new version after adding events |
Long connection cannot be enabled
The app hasn't been published. Complete step 1.5 and wait 1–2 minutes before retrying.
App Secret leaked
- Reset the App Secret in Feishu Open Platform
- Update the App Secret in Buda
- Restart the gateway
Supported message types
Receive
- ✅ Text, rich text
- ✅ Images, files, audio, video
- ✅ Stickers
Send
- ✅ Text, images, files, audio, video
- ✅ Interactive cards (streaming output)
Configuration reference
| Setting | Description | Default |
|---|---|---|
channels.feishu.enabled | Enable/disable channel | true |
channels.feishu.domain | API domain (feishu or lark) | feishu |
channels.feishu.connectionMode | Event transport mode | websocket |
channels.feishu.defaultAccount | Default account ID | default |
channels.feishu.accounts.<id>.appId | App ID | - |
channels.feishu.accounts.<id>.appSecret | App Secret | - |
channels.feishu.dmPolicy | DM policy | pairing |
channels.feishu.allowFrom | DM allowlist (open_id) | - |
channels.feishu.groupPolicy | Group policy | open |
channels.feishu.groupAllowFrom | Group allowlist | - |
channels.feishu.groups.<chat_id>.requireMention | Require @mention | true |
channels.feishu.textChunkLimit | Message chunk size | 2000 |
channels.feishu.mediaMaxMb | Media size limit | 30 |
channels.feishu.streaming | Enable streaming card output | true |
channels.feishu.typingIndicator | Enable typing indicator | true |
channels.feishu.resolveSenderNames | Resolve sender names | true |