Overview
Deploy an AI-powered Feishu (Lark) bot using OpenClaw and AihubMax. This integration allows your team to interact with AI models directly within Feishu conversations.This guide assumes you have already completed the basic OpenClaw Manual Installation. If not, please set up OpenClaw first.
Prerequisites
AihubMax API Key
An active AihubMax API key.
OpenClaw Instance
A running OpenClaw instance (see Manual Installation).
Feishu Developer Account
Access to the Feishu Open Platform (or Lark Open Platform for international).
Configuration
1
Create a Feishu App
- Log in to the Feishu Open Platform (or Lark Open Platform for international).
- Click Create App > Enterprise Self-Built Application.
- Fill in the app name and description.
- Note down the App ID (format:
cli_xxx) and App Secret.
2
Configure Permissions
In the Feishu Open Platform, navigate to Permissions & Scopes and add the following permissions:
3
Enable Bot Capability
- In the app settings, go to App Capabilities > Bot.
- Enable the bot capability.
4
Configure Event Subscriptions
- Go to Event Subscriptions.
- Select “Use Long Connection” (WebSocket) as the connection method.
- Add the event:
im.message.receive_v1(Receive messages).
Using WebSocket long connection means you don’t need a public URL or SSL certificate — the connection is initiated from your server.
5
Install the Feishu Plugin
Install the OpenClaw Feishu plugin:
6
Configure OpenClaw
Add the Feishu configuration to Alternatively, you can set environment variables:
~/.openclaw/openclaw.json:For Lark international users, add
"domain": "lark" to the account configuration.7
Publish and Test
- In the Feishu Open Platform, click Publish to make your bot available.
- Add the bot to a Feishu group chat or start a direct conversation.
- Send a test message like “Hello!”
- The bot should respond using the configured AI model through AihubMax.
Verify the Connection
Send a message to your Feishu bot:Troubleshooting
Bot does not respond in Feishu
Bot does not respond in Feishu
- Verify
appIdandappSecretare correct in the config. - Check that the bot has been published and approved.
- Ensure the
im.message.receive_v1event is subscribed. - Check OpenClaw logs for errors.
Permission denied errors
Permission denied errors
- Ensure all required permissions are granted in the Feishu Open Platform.
- Some permissions require admin approval — check the approval status.
- After adding permissions, you may need to re-publish the bot.
Plugin not loading
Plugin not loading
- Verify the Feishu plugin is installed: check the plugins section in
openclaw.json. - Ensure
"enabled": trueis set for both the plugin entry and the channel. - Restart the OpenClaw daemon after configuration changes.
AI model errors
AI model errors
- Verify your AihubMax API key is valid and has sufficient balance.
- Test the API key directly: