Operations 8 min read

Integrate OpenClaw with Feishu: Mobile Access for Your Self-Hosted AI Agent

This tutorial walks through integrating the self-hosted AI agent OpenClaw with Feishu (Lark) to enable mobile access, covering Feishu app creation, permission configuration, bot setup, OpenClaw plugin installation, channel configuration via CLI, event subscription, and pairing for remote command and feedback.

Cambridge Mofang Notes
Cambridge Mofang Notes
Cambridge Mofang Notes
Integrate OpenClaw with Feishu: Mobile Access for Your Self-Hosted AI Agent

Why Integrate with Feishu

Locally deployed OpenClaw requires the host computer to stay online. Feishu is a common choice for Chinese users to extend communication channels, allowing users to send commands and receive feedback from anywhere. Enterprise WeChat and DingTalk also offer integration capabilities.

Feishu Console Configuration

Step 1: Create an App

Open the Feishu Open Platform and register if needed.

Click Create Enterprise Self-Built App .

Fill in app name and description.

Choose an app icon.

Step 2: Obtain App Credentials

On the Credentials & Basic Info page, copy:

App ID (format like cli_xxx)

App Secret — keep this secret and do not share.

⚠️ Important : Safeguard the App Secret.

Step 3: Configure App Permissions

On the Permission Management page, click Batch Import and paste the following JSON to import required scopes in one go:

{
  "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:write",
      "contact:user.employee_id:readonly",
      "corehr:file:download",
      "docs:document.content:read",
      "event:ip_list",
      "im:chat",
      "im:chat.access_event.bot_p2p_chat:read",
      "im:chat.members:bot_access",
      "im:message",
      "im:message.group_at_msg:readonly",
      "im:message.group_msg",
      "im:message.p2p_msg:readonly",
      "im:message:readonly",
      "im:message:send_as_bot",
      "im:resource",
      "sheets:spreadsheet",
      "wiki:wiki:readonly"
    ],
    "user": [
      "aily:file:read",
      "aily:file:write",
      "im:chat.access_event.bot_p2p_chat:read"
    ]
  }
}

Step 4: Enable Bot Capability

Go to App Capabilities > Bot :

Enable bot capability.

Configure bot name.

OpenClaw Console Configuration

Step 1: Install Feishu Plugin

In the WSL client, run:

openclaw plugins install @openclaw/feishu

Step 2: Restart OpenClaw

openclaw gateway restart

Step 3: Add Channel

Run the channel addition command: openclaw channels add Select Feishu and enter the App ID and App Secret obtained earlier. The interactive prompts and expected values are:

Configure chat channels now? → yes Select a channel → Feishu/Lark Enter Feishu App Secret → App ID (note: the prompt says App Secret but expects App ID)

Enter Feishu App ID → App Secret (prompt says App ID but expects App Secret)

Feishu connection mode → WebSocket Which Feishu domain? → Feishu (feishu.cn) - China Group chat policy → 默认 (default)

Select a channel → Finish Configure DM access policies now? (default: pairing) → Yes Feishu DM policy → Pairing Add display names for these accounts? → No Bind configured channel accounts to agents now? → YES Route feishu account "default" to agent →

main
💡 Note: The table shows App ID and App Secret positions swapped; do not reverse them when filling.

Complete Feishu Event Subscription Configuration

Step 1: Configure Event Subscription

On the Event Subscription page:

Select Use long connection to receive events (WebSocket mode).

Add event: im.message.receive_v1 (receive messages).

⚠️ Note : If the gateway is not started or the channel not added, long-connection setup will fail to save.

Step 2: Publish the App

On the Version Management & Release page, create a version.

Submit for review and publish.

Enterprise self-built apps usually pass automatically.

After publishing, the bot user appears in the Feishu client user list; search by app name if needed.

Complete Pairing and Binding

In Feishu, send any message to the bot and wait for its reply.

Copy the last line of the bot's reply, which looks like openclaw pairing approve.... Back in the WSL client, execute that copied command to complete pairing.

Return to Feishu; you can now send messages normally.

Conclusion

OpenClaw is now connected to Feishu, enabling remote control of your AI agent from anywhere. The agent now:

✅ Thinks (AI model configured)

✅ Acts (various Skills installed)

✅ Stays online (Feishu channel integrated)

Next episode will cover making the agent work autonomously. Follow the author's channel for updates; Enterprise WeChat and DingTalk integration guides are available on request.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLIFeishuWebSocketAI agentself-hostedLarkOpenClawbot configuration
Cambridge Mofang Notes
Written by

Cambridge Mofang Notes

Upholding classic programming, focusing on AI human‑machine collaboration, technology implementation and practice sharing.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.