Skip to content
Guides

OpenClaw on Feishu and Lark

The setup wizard, WebSocket by default, the one-hour webhook window, the two policies, and what the bot can send

5 min read

Feishu, and its international edition Lark, is the all-in-one collaboration platform OpenClaw connects to through the official plugin: bot direct messages, group chats, streaming card replies, and tools for docs, wiki, drive and Bitable. The docs call it production-ready for DMs and groups, with WebSocket as the default event transport, so no public URL is needed, and webhook mode optional. Here is the wizard, how inbound events are made durable, the replay defense that surprises people, the two access policies, the IDs you will need, and what the bot can receive and send.

Setup

  • It needs OpenClaw 2026.5.29 or newer; the channel login wizard installs the plugin if it is missing and walks through setup.
  • Manual setup takes an App ID and App Secret from Feishu Open Platform or Lark Developer; QR setup scans a code in the Feishu app to create a bot automatically, and that flow locks DMs to your own account with an allowlist holding your open id.
  • The wizard also asks for the API domain, Feishu or Lark, and the group policy; if the domestic Feishu mobile app does not react to the QR code, rerun setup and choose manual. Config changes hot-reload, and the probe confirms the channel is ready.
  • Message and document-comment events are queued durably before dispatch, survive a restart, stay serialised per chat or document, and are deduplicated by Feishu’s event id; a WebSocket event that cannot be persisted after bounded retries closes the socket and forces a fresh authenticated connection rather than continuing past an uncommitted turn.
Keep the Gateway host clock synchronized (NTP). A host clock drifting more than one hour from Feishu's servers rejects fresh deliveries.

The webhook window

Feishu signs each webhook delivery at send time, so a captured signed callback stays validly signed forever. Webhook mode therefore rejects any signed callback whose timestamp is more than one hour before or after the Gateway host’s clock, before the body is parsed, a replay defense that works with the per-message replay guard and its twenty-four-hour window so a redelivered callback cannot re-trigger the same action. The practical consequences are the quote above, that ordinary redeliveries carry fresh timestamps and are unaffected, that WebSocket mode is not affected, and that there is no configuration key for the window; it is fixed on purpose. In webhook mode the durable 200 carries the acceptance header, while verification challenges, non-durable event types and error responses omit it.

Who may talk to it

  • Direct messages default to pairing, approved from the CLI; allowlist admits only the listed users, and open requires the wildcard, with non-wildcard entries still narrowing access.
  • Groups default to allowlist: only groups in the group allow list or configured explicitly are answered, open answers every group, and disabled ignores groups even when an explicit entry exists. Mentions are required by default except under an open policy, where the default flips to false so messages that cannot carry mentions, such as images, still reach the agent; broadcast mentions of everyone do not count as a bot mention.
  • A per-group sender allow list narrows who may trigger the bot inside a group, with a channel-wide sender list as the default. Bot-authored messages are ignored unless you grant two scopes and allow bots, and even then the shared loop protection applies. Group ids come from the group settings page and user open ids from the logs or the pending pairing list.

OpenClaw pairing explains the approval code the DM default sends, and OpenClaw hooks and webhooks the durable-acceptance contract the webhook header belongs to.

What the bot receives and sends

Received: text, rich text, images, files, audio, video and stickers, with a sticker’s reusable key exposed to the agent and inbound voice notes transcribed before the turn when an audio transcription provider is configured. Sent: text, images, files, audio as native Opus bubbles when the reply asks for voice delivery, with other formats transcoded and a file-attachment fallback when conversion fails, video, interactive cards including streaming updates, stickers the same bot previously received once the sticker action is enabled, and rich text with partial formatting. A curated sticker set with keywords lets the agent find a received sticker by a case-insensitive substring, within fixed limits on sets, stickers and keywords. Inline and thread replies both work, and media replies stay thread-aware. OpenClaw streaming and chunking explains the card and preview streaming the channel supports.

On Diali

Feishu is not among the channels Diali connects today: the ones we run are WhatsApp, Telegram, Discord, Slack, Mattermost, Matrix, SMS and voice, and a self-run instance is where this plugin lives for now. Connect your first channel in five minutes shows our connect flow, Hosted OpenClaw on Diali is the assistant and Diali security describes the boundary.

  • WebSocket by default, no public URL.
  • Webhook callbacks older than an hour are rejected; keep the clock synced.
  • Pairing for DMs, allowlist for groups, mentions by default.
Get started

Stop reading about it, build one

Set up an agent, pick a channel, and have it working inside the app you already keep open.