- Lark and Feishu are the same platform — OpenClaw's connector works with both. Check your tenant's domain before configuring API endpoints.
- Lark's event subscription model is more structured than most platforms — you explicitly subscribe to specific event types, reducing noise and improving security.
- The @mention filter in OpenClaw's Lark config ensures the bot only activates when addressed directly in group chats, not on every message.
- Card Kit messages let your agent return structured, interactive responses — buttons, tables, and collapsible sections instead of walls of text.
- As of early 2025, Lark's app token (not user token) is the correct auth method for bot-to-channel communication in OpenClaw deployments.
Lark is the fastest-growing enterprise platform outside of North America, with over 220,000 companies on it as of early 2025. Teams running on Lark already have messaging, docs, calendar, and HR in one place. Connecting OpenClaw to Lark means your AI agent lives inside all of it — one bot that answers questions, surfaces document content, and handles routine requests across your entire organisation.
Lark vs Feishu: What You Need to Know First
Before touching any configuration, clarify which version of the platform your team uses. Lark (larksuite.com) serves international markets. Feishu (feishu.cn) serves the Chinese domestic market. Same product, different API base URLs and different developer portals.
OpenClaw's Lark connector handles both, but you must set the correct baseUrl in your config. International tenants use https://open.larksuite.com. Feishu tenants use https://open.feishu.cn. Using the wrong URL causes all API calls to fail silently.
Open any Lark message in a browser. The URL shows either larksuite.com or feishu.cn. That's your tenant's domain. Use the matching API base URL in OpenClaw. Mixing domains — even partially — breaks authentication and event delivery.
Creating Your Lark Bot App
Every Lark bot starts as an app in the Lark Open Platform developer console. Navigate to the console at open.larksuite.com/app (or open.feishu.cn/app for Feishu). Click "Create App" and select "Custom App."
- Name your app and add an icon. Users see this in the bot search and chat list.
- Navigate to Features → Bot. Enable the bot feature for your app.
- Go to Permissions & Scopes. Add the required permissions (listed below).
- Navigate to Event Subscriptions. Set your webhook URL and subscribe to events.
- Go to App Credentials. Copy your App ID and App Secret — these are your authentication credentials.
- Create a version and publish. Tenant admins must approve internal apps before users can add them.
Required Permissions
im:message— send and receive messagesim:message.group_at_msg:readonly— read @mention messages in groupsim:chat— access chat and group metadatacontact:user.id:readonly— resolve sender user IDs
Even after you publish your Lark app, it won't be available to your team until a Workspace admin approves it in the Admin Console under App Management. Build this approval step into your deployment timeline — it can take 24–48 hours depending on your organisation's review process.
Event Subscriptions and Webhooks
Lark's event system is explicit: you subscribe only to the specific event types your bot needs. This is cleaner than platforms that send all events to your webhook regardless. For OpenClaw, you need the following event subscriptions:
- im.message.receive_v1 — fires when a user sends a message to the bot (DM or @mention in group)
- im.message.reaction.created_v1 — fires when a user reacts to a message (optional, for feedback tracking)
- card.action.trigger — fires when a user clicks a button on a Card Kit message
In the developer console, paste your OpenClaw webhook URL into the Event Subscription URL field. Lark sends a verification request immediately. OpenClaw responds with the correct challenge value to complete verification.
// openclaw.config.js — Lark channel
module.exports = {
channels: {
lark: {
enabled: true,
baseUrl: 'https://open.larksuite.com', // or open.feishu.cn
appId: process.env.LARK_APP_ID,
appSecret: process.env.LARK_APP_SECRET,
verificationToken: process.env.LARK_VERIFICATION_TOKEN,
encryptKey: process.env.LARK_ENCRYPT_KEY,
agentId: 'team-assistant',
respondToMentionsOnly: true,
useCardsForLongResponses: true,
threadedReplies: true
}
}
};
OpenClaw Lark Configuration Details
Three config options need careful attention: respondToMentionsOnly, encryptKey, and useCardsForLongResponses.
respondToMentionsOnly: true ensures your bot stays quiet in group chats unless directly @mentioned. Without this, the bot responds to every message in every group it's been added to — which is disruptive and burns through API quota.
encryptKey is optional but strongly recommended. Lark supports AES-256 encryption for webhook payloads. Set an encrypt key in the developer console and in your OpenClaw config. Encrypted payloads prevent man-in-the-middle inspection of message content.
| Config Key | Recommended | Effect |
|---|---|---|
| respondToMentionsOnly | true | Bot silent unless @mentioned in groups |
| encryptKey | set in prod | Encrypts webhook payloads |
| useCardsForLongResponses | true | Sends Card Kit for responses over 500 chars |
| threadedReplies | true | Replies in-thread, not as new messages |
Always use the app token (tenant_access_token) for OpenClaw's Lark integration — not a user token. App tokens are long-lived, don't require user re-authentication, and carry bot-level permissions. User tokens expire and break your integration silently after a few hours.
Card Kit Messages for Rich Responses
Lark's Card Kit is more capable than most developers realise. Cards support text modules, markdown, images, action buttons, column sets, and collapsible sections. Your OpenClaw agent can return genuinely rich, interactive responses — not just text.
When useCardsForLongResponses is enabled, OpenClaw automatically wraps responses over 500 characters in a Card Kit template with a header showing the query, the response in a text module, and an optional "Ask Follow-up" button that opens a DM thread with the agent.
For custom card responses, return a structured card object from your agent handler. OpenClaw's Lark adapter sends it via the im.message.create API with msg_type: "interactive". Button click events come back as card.action.trigger events, routed to your configured action handler.
Common Mistakes
- Wrong baseUrl for your tenant. International and Feishu tenants have different API domains. Using the wrong one causes every API call to return a 404. Check your Lark URL before setting baseUrl.
- Not subscribing to card.action.trigger. If you send interactive cards with buttons, you must subscribe to this event. Without it, button clicks are received by Lark but never forwarded to OpenClaw — the user clicks, nothing happens.
- Forgetting tenant admin approval. Your app can be fully built and tested, but if the admin hasn't approved it, no one in the tenant can find or add the bot. Submit for approval as early as possible.
- Using respondToMentionsOnly: false in large groups. With this off, your bot responds to every message in every group. In a group with 200 people, that's thousands of agent calls per day. Always enable mention-only mode in groups.
- Storing app credentials in code. Lark App ID and App Secret give full access to your bot's capabilities. Always use environment variables. Rotate credentials immediately if they're ever exposed in a repository.
Deploying to Multiple Lark Tenants
If you're building an OpenClaw integration for multiple organisations (each with their own Lark tenant), you need a multi-tenant setup. Each tenant gets its own App ID and credentials. OpenClaw routes incoming events to the correct agent instance by matching the tenant_key field in the event payload.
Define multiple Lark channel entries in your OpenClaw config, keyed by tenant. The adapter inspects each event's tenant_key and routes it to the matching config. This is the pattern for ISVs building OpenClaw-powered products on top of Lark.
Frequently Asked Questions
Is Lark the same as Feishu?
Lark and Feishu are the same product under different brand names. Lark serves international markets; Feishu serves the Chinese domestic market. OpenClaw's Lark connector works with both — the API endpoints and authentication flow are identical. Check which domain your tenant uses before configuring.
What Lark permissions does OpenClaw need?
At minimum: im:message (read and send messages), im:chat (access group info), and contact:user.id:readonly (resolve user IDs). For bot commands and card interactions, also add im:message.react and application:application.bot.info:readonly.
Can OpenClaw respond to @mentions in Lark group chats?
Yes. Subscribe to the im.message.receive_v1 event in your Lark app config. OpenClaw filters events where the message mentions the bot's open_id. The bot only activates on @mentions in groups, preventing it from reading every group message.
Does OpenClaw support Lark's interactive card messages?
Yes. OpenClaw's Lark adapter supports Card Kit messages with actions, buttons, text modules, and column sets. Return a card JSON object from your agent handler and the adapter posts it via the sendMessage API. Card interactions (button clicks) are routed back to your agent as events.
How do I deploy OpenClaw to a Lark Enterprise tenant?
Enterprise tenants require the app to pass Lark's App Review before installation. Create the app in Lark Open Platform, complete the review submission with a use-case description and demo video, and publish. Internal enterprise apps bypass the public review but still need tenant admin approval.
Can OpenClaw access Lark Docs and Sheets through the integration?
The messaging integration alone doesn't access Docs or Sheets. Add the docx:document:readonly and sheets:spreadsheet:readonly scopes to your Lark app and use OpenClaw's tool-calling feature to query those APIs within agent responses. This creates a genuinely integrated Workspace AI.
What is the message size limit in Lark for OpenClaw responses?
Lark text messages are limited to 150KB per message. In practice, very long agent responses should use card messages with collapsible sections rather than a single text block. OpenClaw's adapter handles this automatically if you set use_cards_for_long_responses: true in the channel config.
M. Kim has architected Lark and Feishu integrations for multinational enterprises, including a deployment serving 8,000 employees across 14 countries. He has navigated Lark's App Review process for both internal and ISV applications, and specialises in multi-tenant OpenClaw deployments on the Lark Open Platform.