Prerequisites
- macOS, Linux, or Windows 10 2004+ / Windows 11 (with WSL)
- A Qhaigc API key — get yours from the API Tokens page
- A Feishu account with permission to create enterprise apps at open.feishu.cn
Windows: Install WSL First
macOS and Linux users can skip this section and start directly at Step 1.
- Confirm CPU virtualization is enabled. Check in Task Manager → Performance → CPU. If it is not enabled, follow your motherboard’s instructions to enable it in BIOS.
- Install Ubuntu from the Microsoft Store: open the Store app and search for Ubuntu, or visit the Ubuntu product page directly.
- On first launch, Ubuntu prompts you to create a Linux username and password. The password does not display as you type — press Enter when done.
Step 1: Run the Installation Script
Open a terminal (or Ubuntu on Windows) and run:Step 2: Enter Your Qhaigc API Key
During installation, the script pauses and asks for your Qhaigc API key. Paste your key into the terminal and press Enter to continue.Step 3: Create a Feishu App
- Go to open.feishu.cn and log in with your Feishu account.
- Click Create App → Enterprise Self-Built App.
- Enter an app name and description, then complete the creation.
Step 4: Configure Feishu Permissions
- In your new app, open Permission Management.
- Click Bulk Import and paste the following JSON to import all required permissions at once:
Step 5: Publish the Feishu App for the First Time
Go to Version Management & Release, create a new version, submit for review, and publish it.Step 6: Enter Your Feishu Credentials in the Terminal
- In your Feishu app, go to Credentials & Basic Info.
- Copy the App ID and paste it into the terminal prompt.
- Copy the App Secret and paste it into the next prompt.
Step 7: Configure Event Subscriptions
In your Feishu app, go to Events & Callbacks:- Select Receive events using long connection (WebSocket mode).
- Add the event
im.message.receive_v1.
Step 8: Save Changes and Republish
Return to Version Management & Release, save the current changes, and publish again to ensure all configuration (including event subscriptions) takes effect.Step 9: Complete the Pairing in Feishu
- Open the Feishu client and create a new group chat.
- Add your bot to the group.
- Send a test message such as “Hello”.
-
The bot responds with an English message containing a pairing command similar to:
- Copy that command and run it in the terminal where OpenClaw is installed.
Common Questions
How do I know if OpenClaw installed successfully? The terminal prints a clear success message at the end of installation and then continues to the API key prompt. If installation fails, an error message is shown instead. Why does the bot reply in English with a command on first message? This is OpenClaw’s security pairing flow. Run theopenclaw pairing approve feishu ... command once in your terminal to authorize the connection.
How do I uninstall OpenClaw?
Run openclaw uninstall in your terminal.
When should I publish the Feishu app?
Publish twice: once after creating the app (before entering credentials in the terminal), and again after configuring event subscriptions. The pairing step happens last.