CA
Docs home

Lark / Feishu

Connect Lark or Feishu when you want an agent available from private chats, groups, or team workflows in a Lark / Feishu workspace.

Prerequisites

  • An existing Cloud Agents agent.
  • Permission to create or manage a custom app in the Lark or Feishu Open Platform.
  • Bot capability enabled for the app.

Create the app

  1. Open the Feishu or Lark Open Platform console.
  2. Create a custom app.
  3. Enable the bot capability.
  4. Copy the App ID and App Secret.
  5. Publish the app version after changing permissions or event subscriptions.

Recommended permissions:

Permission areaWhy
Read messages sent to the bot in DMsReceive private messages.
Read group messages or group mentionsReceive group messages.
Send messages as botSend agent replies and progress cards.
Read bot or chat metadataLet health checks verify bot identity.

The exact scope names differ between Feishu and Lark consoles, but they are the im:* bot messaging scopes.

Event subscription

Subscribe the app to message events:

EventWhy
im.message.receive_v1Receive user messages.

Cloud Agents can use webhook delivery or long-connection delivery, depending on what your workspace supports. Webhook mode is the usual setup for most users.

For webhook security, configure either a Verification Token or Encrypt Key in both the Open Platform console and Cloud Agents.

Connect it to Cloud Agents

  1. Open Settings -> Channels.
  2. Create a new channel and choose Lark / Feishu.
  3. Select the agent that should receive messages.
  4. Enter a label, App ID, App Secret, and webhook security values.
  5. Create the channel.
  6. Copy the inbound URL from the channel detail page.
  7. Paste it into the Open Platform event subscription Request URL.
  8. Publish the app version after changing permissions or subscriptions.
  9. Run the channel test.
SettingRecommendation
Mention onlyKeep on for groups so the agent replies only when mentioned.
Bot nameSet the bot display name so group mentions are detected reliably.
Shared sessionKeep off unless everyone in the group should share one conversation.
Progress modeUse preview for an updating progress card while the agent works.

Verify

Open the channel detail page and run Test. A healthy channel confirms valid app credentials and recent delivery status.

Troubleshooting

  • Webhook verification fails: confirm the Verification Token or Encrypt Key, then paste the current inbound URL from Cloud Agents.
  • Messages do not arrive: confirm im.message.receive_v1 is subscribed and the app version is published.
  • Group messages are ignored: set the bot display name, mention the bot, or turn off mention-only mode.
  • Bot identity check fails: confirm the App ID, App Secret, region, and approved messaging scopes.

See also