This article documents my complete process of deploying the OpenClaw personal AI assistant and connecting it to a Feishu bot, including all the pitfalls I ran into and how I solved them.
Project Introduction
OpenClaw is a personal AI assistant that runs locally and can connect to various messaging platforms (Telegram, Discord, Feishu, etc.). Unlike other AI tools, OpenClaw is an execution engine that goes “from giving advice to doing things.” It can:
- Read local files and execute commands
- Connect to IM platforms like Feishu and Telegram
- Integrate multiple AI models (OpenAI, Kimi, Claude, etc.)
- Receive messages through a long connection or Webhook


Environment Preparation
System Requirements
- Ubuntu 22.04+ / macOS / Windows
- Node.js 22 or newer
- A Feishu developer account
Installing OpenClaw
|
Deployment Process
1. Initial Configuration
Quick deployment using non-interactive mode:
|
After a successful deployment, the Gateway service runs in the background:
- Dashboard: http://127.0.0.1:18789/
- WebSocket: ws://127.0.0.1:18789
- Systemd service:
openclaw-gateway.service
2. Configuring the Feishu Bot
After creating an app in the Feishu developer console (https://open.feishu.cn/app/), configure the following:
|
3. Configuring the Kimi AI Model
By default OpenClaw uses a synthetic model (a simulated environment). To connect the real Kimi API:
Method: environment variable configuration (recommended)
|
Pitfall Log
Pitfall 1: 401 Invalid Authentication
Problem: Still getting a 401 error after configuring the API Key.
Cause: The API Key was configured under models.providers.moonshot.apiKey, but OpenClaw actually reads authentication info from auth.profiles.
Solution: Configure it via the MOONSHOT_API_KEY environment variable to avoid config file format issues.
Pitfall 2: Kimi Code vs. Moonshot AI
Problem: The API Key requested from the Kimi Code console (www.kimi.com/code) doesn’t work.
Cause: These are two different services:
- Kimi Code: a membership service aimed at coding scenarios
- Moonshot AI (platform.moonshot.cn): the developer API platform
Solution: You must request the API Key at https://platform.moonshot.cn/.
Pitfall 3: Wrong Model ID
Problem: A “model does not exist” error:
|
Cause: The model ID configured in OpenClaw didn’t match the actual one.
Solution: The list of models supported by the Moonshot API:
kimi-k2.5(note the dot — notkimi-k2-5)kimi-k2-turbo-previewmoonshot-v1-8kmoonshot-v1-32k- etc.
Pitfall 4: Insufficient Feishu Permissions
Problem: Messages are received, but the sender’s info can’t be fetched.
Error code: 99991672
Solution: Enable the following permissions in the Feishu developer console:
contact:contact.base:readonlyim:message:send_as_botim:chat:readonlyim:message.group_msg
Pitfall 5: No Reply to Messages
Problem: You send a message in Feishu, but the bot doesn’t reply.
Cause: ackReactionScope was set to group-mentions, so it only replies when @-mentioned.
Solution:
|
Verifying the Deployment
Check the service status
|
Key things to check:
- Gateway: reachable
- Feishu: ON / OK
- Sessions: shows active sessions
View real-time logs
|
Test API connectivity
|
Final Configuration Reference
Directory Structure
|
Key Config Entries
~/.openclaw/openclaw.json (partial):
|
Common Commands
|
Summary
With this pitfall log, I hope you can finish deploying OpenClaw + Feishu within 10 minutes, instead of messing around for hours like I did 😅
Key points:
- Use an API Key from the Moonshot AI platform (not Kimi Code)
- Configuring the API Key via an environment variable is the most stable approach
- Remember the model ID is
kimi-k2.5(with a dot) - The Feishu console needs the contacts and messaging permissions enabled
Now your Feishu bot can intelligently reply to messages! 🎉
Reference links:
- OpenClaw docs: https://docs.openclaw.ai/
- Moonshot AI: https://platform.moonshot.cn/
- Feishu Open Platform: https://open.feishu.cn/
评论
0 条评论