Overview
Deploy an AI-powered Feishu (Lark) bot using OpenClaw and FoxAPI. 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
FoxAPI API Key
An active FoxAPI 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
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.
Configure Permissions
In the Feishu Open Platform, navigate to Permissions & Scopes and add the following permissions:
| Permission | Description |
|---|---|
im:message | Read and write messages |
im:message:send_as_bot | Send messages as the bot |
im:chat | Access chat information |
im:chat:readonly | Read chat information |
Enable Bot Capability
- In the app settings, go to App Capabilities > Bot.
- Enable the bot capability.
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.
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.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 FoxAPI API key is valid and has sufficient balance.
- Test the API key directly: