Chapter 4: Chat Platform Integration
After completing this chapter, you'll be able to chat with the lobster on your phone.
AutoClaw users: Scan the QR code in Lark to complete integration — you can skip this chapter.
0. Which Chat Platforms Are Supported?
OpenClaw supports almost all mainstream chat applications, with text messaging available across all channels.
| Channel | Description | Installation |
|---|---|---|
| Feishu / Lark | WebSocket persistent connection; preferred for enterprise collaboration | Built-in |
| WorkBuddy bridge; personal accounts / WeCom | Plugin | |
| QQ Open Platform Bot API | Plugin | |
| Most popular globally; Baileys library, requires QR pairing | Built-in | |
| Telegram | Bot API (grammY); supports group chats, most open API | Built-in |
| Discord | Bot API + Gateway; servers, channels, direct messages | Built-in |
| Slack | Bolt SDK; workspace apps | Built-in |
| Signal | signal-cli; privacy-focused | Built-in |
| Google Chat | Google Chat API; HTTP webhook | Built-in |
| iMessage | BlueBubbles (recommended) or legacy imsg CLI | Built-in |
| IRC | Classic IRC server; channels + direct messages | Built-in |
| WebChat | Built-in web chat interface in the Gateway | Built-in |
| LINE | LINE Messaging API | Plugin |
| Matrix | Matrix open protocol | Plugin |
| Mattermost | Bot API + WebSocket | Plugin |
| Microsoft Teams | Bot Framework; enterprise support | Plugin |
| Nostr | Decentralized protocol NIP-04 | Plugin |
| Twitch | IRC connection | Plugin |
| Zalo | Zalo Bot API (Vietnam) | Plugin |
Can multiple platforms be connected at the same time?
Yes. OpenClaw automatically routes messages by source — use Feishu for work and Telegram as a personal assistant, all sharing the same AI brain.
This chapter uses Feishu as the example — it's the preferred platform for office use in China, with deep integration for documents, calendars, and multi-dimensional tables. Telegram is simpler to configure but requires a proxy in mainland China.
1. Prerequisites
- Completed the installation in Chapter 2 (
openclaw statusshows normal) - A Feishu account (personal account is fine; no enterprise admin permissions required)
2. Create a Feishu App
Step 1: Log in to the Feishu Open Platform
Visit the Feishu Open Platform and log in with your Feishu account.

Using the international Lark version?
Visit Lark Open Platform and set domain: "lark" in the subsequent configuration.
Step 2: Create an Enterprise Custom App
Click "Create Enterprise Custom App", fill in the name (e.g., "OpenClaw Assistant") and description, then click "Create".
Step 3: Obtain App Credentials
Go to "Credentials & Basic Info", copy the App ID (format: cli_xxx) and App Secret, and save them securely.

Step 4: Enable Bot Capability
Go to "Add App Capabilities" → "Bot" and click "Add".

This step must be done first: Otherwise, when importing permissions in the next step, messaging-related permissions cannot be enabled.
Step 5: Configure Permissions
Go to "Permission Management", click "Batch Import", and paste the following JSON:

{
"scopes": {
"tenant": [
"application:application:self_manage",
"application:bot.menu:write",
"cardkit:card:read",
"cardkit:card:write",
"contact:contact.base:readonly",
"contact:user.employee_id:readonly",
"docs:document.content:read",
"docx:document:readonly",
"event:ip_list",
"im:chat",
"im:chat.members:bot_access",
"im:chat:read",
"im:chat:update",
"im:message",
"im:message.group_at_msg:readonly",
"im:message.group_msg",
"im:message.p2p_msg:readonly",
"im:message.pins:read",
"im:message.pins:write_only",
"im:message.reactions:read",
"im:message.reactions:write_only",
"im:message:readonly",
"im:message:recall",
"im:message:send_as_bot",
"im:message:send_multi_users",
"im:message:send_sys_msg",
"im:message:update",
"im:resource",
"sheets:spreadsheet",
"wiki:wiki:readonly"
],
"user": [
"base:app:copy",
"base:app:create",
"base:app:read",
"base:app:update",
"base:field:create",
"base:field:delete",
"base:field:read",
"base:field:update",
"base:record:create",
"base:record:delete",
"base:record:retrieve",
"base:record:update",
"base:table:create",
"base:table:delete",
"base:table:read",
"base:table:update",
"base:view:read",
"base:view:write_only",
"board:whiteboard:node:create",
"board:whiteboard:node:read",
"calendar:calendar.event:create",
"calendar:calendar.event:delete",
"calendar:calendar.event:read",
"calendar:calendar.event:reply",
"calendar:calendar.event:update",
"calendar:calendar.free_busy:read",
"calendar:calendar:read",
"contact:contact.base:readonly",
"contact:user.base:readonly",
"contact:user.employee_id:readonly",
"contact:user:search",
"docs:document.comment:create",
"docs:document.comment:read",
"docs:document.comment:update",
"docs:document.media:download",
"docs:document:copy",
"docx:document:create",
"docx:document:readonly",
"docx:document:write_only",
"drive:drive.metadata:readonly",
"drive:file:download",
"drive:file:upload",
"im:chat.members:read",
"im:chat:read",
"im:message",
"im:message.group_msg:get_as_user",
"im:message.p2p_msg:get_as_user",
"im:message:readonly",
"offline_access",
"search:docs:read",
"search:message",
"space:document:delete",
"space:document:move",
"space:document:retrieve",
"task:comment:read",
"task:comment:write",
"task:task:read",
"task:task:write",
"task:task:writeonly",
"task:tasklist:read",
"task:tasklist:write",
"wiki:node:copy",
"wiki:node:create",
"wiki:node:move",
"wiki:node:read",
"wiki:node:retrieve",
"wiki:space:read",
"wiki:space:retrieve",
"wiki:space:write_only"
]
}
}This permission bundle covers the full set of capabilities including messaging, cloud documents, multi-dimensional tables, calendar, and tasks.
What do these permissions do?
| Permission Category | Representative Permissions | Purpose |
|---|---|---|
| App Management (application:) | application:application:self_manage, application:bot.menu:write | App self-management, bot menu configuration |
| Message Cards (cardkit:) | cardkit:card:read, cardkit:card:write | Read and write message cards |
| Messaging (im:) | im:message, im:message:send_as_bot, im:resource | Send and receive messages, images, files |
| Group Chat (im:chat) | im:chat, im:chat.members:bot_access | Group chat management, member access |
| Contacts (contact:) | contact:user.base:readonly, contact:user.employee_id:readonly | Retrieve basic user information |
| Cloud Documents (docx:/docs:) | docx:document:create, docs:document.content:read | Create and read Feishu documents |
| Spreadsheets (sheets:) | sheets:spreadsheet | Operate Feishu spreadsheets |
| Multi-dimensional Tables (base:) | base:record:create, base:table:read | Operate multi-dimensional table data |
| Calendar (calendar:) | calendar:calendar.event:create, calendar:calendar.event:read | Manage calendar events |
| Tasks (task:) | task:task:read, task:task:write | Create and manage Feishu tasks |
| Wiki (wiki:) | wiki:node:read, wiki:wiki:readonly | Read and write the Feishu knowledge base |
| Cloud Storage (drive:/space:) | drive:file:upload, drive:file:download | Upload and download files |
| Whiteboard (board:) | board:whiteboard:node:create, board:whiteboard:node:read | Read and write Feishu whiteboards |
| Search (search:) | search:docs:read, search:message | Search documents and messages |
| Events (event:) | event:ip_list | Event push IP allowlist |
If you only need basic chat functionality, the minimum required permissions are: im:message, im:message.p2p_msg:readonly, im:message.group_at_msg:readonly, im:message:send_as_bot, and im:resource. However, importing the full permission set is recommended for the best experience.
After importing, click "Apply for Authorization" to confirm. Enterprise admins can approve directly; otherwise, contact your admin for review.
Step 6: Publish the App
Go to "Version Management & Publishing", click "Create Version", fill in the version number, and submit the publishing request. The app takes effect once approved by the admin (you can approve it yourself if you are the admin).

3. Add the Feishu Channel in OpenClaw
Return to your terminal and run:
openclaw channels addSelect "Feishu/Lark", enter the App ID and App Secret, and keep the rest as defaults. After adding, restart the gateway:
openclaw gateway restart
openclaw gateway statusConfirm that the feishu channel status in the output shows connected.
Equivalent CLI command (recommended)
Don't want to use the interactive wizard? You can do it in one line:
openclaw channels add --channel feishu --token "cli_xxx:your_app_secret"
openclaw gateway restartNot recommended to edit the config file directly — manually editing JSON is prone to missing commas or brackets, which causes configuration parsing failures. Always prefer CLI commands.
3.5 Configure Event Subscriptions
This step must be performed after the previous step (adding the channel + starting the gateway). Feishu performs a real-time check for WebSocket connections when saving persistent connection settings — if the OpenClaw gateway is not running, Feishu will report an "Application connection information not detected" error and will not save.
Return to the Feishu Open Platform and go to "Events & Callbacks" → "Event Configuration":

- Select "Use persistent connection to receive events"
- Add event:
im.message.receive_v1
Why use a persistent connection instead of a Webhook?
Webhooks require a public IP address. A persistent connection (WebSocket) has OpenClaw actively connect to Feishu — no public IP, no domain name, and it works on a home network.
4. Pairing and First Conversation
Find your bot in Feishu and send "Hello". The bot will reply with an 8-character pairing code:

Why is pairing required?
To prevent strangers from abusing your bot — every conversation consumes your API quota. When a new user sends their first message, they receive a pairing code. They can only have a normal conversation after you approve them. Pairing codes expire after 1 hour.
Approve in the terminal:
openclaw pairing approve feishu <pairing-code>For example: openclaw pairing approve feishu 6KKG7C7K. You can also click Approve in the web dashboard (openclaw dashboard).
Once paired, the lobster in Feishu will respond to you. Try:
Hello, please introduce yourself5. Using in Group Chats
Add the bot to a Feishu group and @mention the bot to trigger a reply.
Group chat access control
OpenClaw controls group chat behavior via groupPolicy:
| Policy | Behavior |
|---|---|
"open" | Allow all group chats; still requires @mention to reply |
"allowlist" | Only allow groups on the allowlist (default) |
"disabled" | Disable all group chat messages |
Configuration examples:
# Allow all group chats
openclaw config set channels.feishu.groupPolicy "open"
# Set a specific group to reply without requiring @mention
openclaw config set channels.feishu.groups.<group-id>.requireMention falseEach group in a group chat has its own independent conversation — group conversations do not affect your private chat history with the bot.
Direct message access policy (dmPolicy)
dmPolicy controls who can use your bot via direct message:
| Policy | Behavior |
|---|---|
"pairing" | Default. New users require pairing code approval |
"allowlist" | Only allow users in the allowFrom list |
"open" | Allow everyone (requires setting "*" in allowFrom) |
"disabled" | Disable direct messages |
6. Troubleshooting
Event subscription fails to save?
First confirm the gateway is running (openclaw gateway status). Persistent connection mode requires the gateway to be online for registration.
Bot not replying?
Troubleshoot in order:
openclaw status— Is the gateway running?openclaw pairing list feishu— Has pairing been completed?openclaw logs --follow— View real-time logs to locate the erroropenclaw gateway restart— Restart and retry
Permission review rejected?
If you are the admin, go to the Feishu Admin Console → "Workplace" → "App Review", find the app, and click "Approve".

Configuration changes not taking effect?
Run openclaw gateway restart. For more configuration options, see Appendix G.
@mentioned the bot in a group chat but no response?
Check whether groupPolicy is set to "disabled" or "allowlist" (the latter requires adding the group ID to the allowlist).