Skip to main content

Overview

OpenClaw is an open-source AI agent Gateway that acts as a bridge between chat applications and AI agents. Through a centralized Gateway process, it connects chat platforms like Telegram, WhatsApp, Discord, and Feishu (Lark) to AI coding agents, enabling direct AI programming interactions within chat windows. By configuring EvoLink API as a custom model provider in OpenClaw and connecting a Feishu Bot, you can use EvoLink’s Claude models (such as Claude 4.6 Opus, Claude 4.5 Sonnet, Claude 4.5 Haiku) for AI-assisted coding conversations directly in Feishu. The Feishu channel uses WebSocket long connection mode to receive messages — no public URL required. This guide covers:
  • Installing and configuring OpenClaw Gateway
  • Creating a Feishu enterprise application with bot capability
  • Setting up EvoLink API as a custom model provider
  • Verifying the connection and getting started

Prerequisites

Before configuring, make sure you have:

1. Install Node.js

OpenClaw is installed via npm. You need to install Node.js first.
  • Log in to EvoLink Dashboard
  • Find API Keys in the dashboard, click ‘Create New Key’ button, then copy the generated Key
  • API Key usually starts with sk-

3. Prepare a Feishu Account

You need a Feishu enterprise account to create applications on the Feishu Open Platform.

Step 1: Install OpenClaw

Run the following command in your terminal:
npm install -g openclaw@latest
Install the Feishu plugin:
openclaw plugins install @openclaw/feishu

Step 2: Onboarding

Run the onboarding command. OpenClaw will guide you through the initial setup and install the background daemon service:
openclaw onboard --install-daemon

1. Confirm Installation

The system will display a risk disclaimer. Confirm to proceed: Confirm Installation

2. Select Installation Mode

When prompted to choose an installation mode, select Quickstart: Select Quickstart

3. Select Provider

When prompted to choose a model provider, select Skip. We will manually configure EvoLink as a custom provider later: Skip Provider Selection

4. Select Models

When prompted to choose which models to enable, select All: Select All Models

5. Select Default Model

When prompted to choose a default model, select Keep current: Keep Current Model

Step 3: Create Feishu Application

1. Log in to Feishu Open Platform

Visit the Feishu Open Platform and log in with your Feishu account.
For Lark (international version), use https://open.larksuite.com/app and set domain: "lark" in the configuration.

2. Create Application

Click Create Enterprise Self-Built Application, fill in the application name and description, and choose an icon. Create Application

3. Get Credentials

On the Credentials & Basic Info page, copy:
  • App ID (format: cli_xxx)
  • App Secret
Keep your App Secret safe. Do not share it with others.
Get Credentials

4. Configure Permissions

On the Permission Management page, click Batch Import and paste the following JSON to import all required permissions:
{
  "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:contact.base:readonly",
      "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"
    ]
  }
}
Configure Permissions

5. Enable Bot Capability

In the left sidebar, click App Capabilities, find the Bot card, and toggle the menu status to enabled. Once enabled, fill in the bot name and description — users will see these when searching for or chatting with the bot in Feishu. Enable Bot Capability

6. Configure Event Subscriptions

Before configuring event subscriptions, make sure you have:
  • Completed the Feishu channel configuration (see Step 4)
  • The gateway is running (check with openclaw gateway status)
On the Event Subscriptions page:
  1. Select Use Long Connection to Receive Events (WebSocket mode)
  2. Add event: im.message.receive_v1 (Receive Message)
If the gateway is not running or the channel has not been added, the long connection setup will fail to save.
Configure Event Subscriptions

7. Publish Application

Go to Version Management & Release, create a version, submit for review and publish. Enterprise self-built applications are usually approved automatically.

Step 4: Configure OpenClaw

OpenClaw’s configuration is centralized in ~/.openclaw/openclaw.json. There are three key configuration domains:
  • plugins.entries.* — Controls which plugins to load
  • channels.* — Controls channel connections and account credentials
  • models.providers.* — Controls model providers

1. Add Feishu Channel

Open ~/.openclaw/openclaw.json:Enable the Feishu plugin (plugins.entries):
"plugins": {
  "entries": {
    "feishu": {
      "enabled": true
    }
  }
}
Configure Feishu channel credentials (channels.feishu):
"channels": {
  "feishu": {
    "enabled": true,
    "dmPolicy": "pairing",
    "accounts": {
      "main": {
        "appId": "cli_xxx",
        "appSecret": "your-app-secret",
        "botName": "My AI Assistant"
      }
    }
  }
}
Feishu credentials must be placed under channels.feishu.accounts, NOT under plugins.entries.feishu. Placing them in the wrong location will cause an Unrecognized key error.
You can also configure via environment variables:
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
In the same openclaw.json, find the models field and add EvoLink as a custom model provider:
"models": {
  "providers": {
    "anthropic": {
      "api": "anthropic-messages",
      "baseUrl": "https://code.evolink.ai",
      "apiKey": "your-evolink-api-key",
      "models": [
        {
          "id": "claude-opus-4-6",
          "name": "Claude Opus 4.6",
          "reasoning": false,
          "input": ["text"],
          "cost": {
            "input": 0,
            "output": 0,
            "cacheRead": 0,
            "cacheWrite": 0
          },
          "contextWindow": 200000,
          "maxTokens": 8192
        }
      ]
    }
  }
}
Replace "your-evolink-api-key" with the actual API Key from your EvoLink Dashboard.

3. Configure Default Model

In the agents field, set the default model:
"model": {
  "primary": "anthropic/claude-opus-4-6"
}

4. Restart Gateway

Restart the OpenClaw Gateway to apply the configuration:
openclaw gateway restart
Always use openclaw gateway restart instead of manually starting another process, otherwise you will get a port conflict error.
Verify the configuration is loaded correctly:
openclaw gateway status

Step 5: Verify Connection

1. Find the Bot in Feishu

Open Feishu, search for the bot name you created, and start a conversation.

2. Get Pairing Code

Send any message to the bot. It will return a pairing code.

3. Complete Pairing

Open a new terminal window and run:
openclaw pairing approve feishu <pairing-code>
Replace <pairing-code> with the actual code returned by the bot. Make sure to remove the angle brackets <>.

4. Test Connection

After pairing is complete, send a message to the bot in Feishu:
Hello, please introduce yourself
If you receive an AI response, the integration is complete.

Access Control

Direct Message Access

Default dmPolicy: "pairing" — unknown users will receive a pairing code that must be approved by an admin:
openclaw pairing list feishu        # View pending approvals
openclaw pairing approve feishu <CODE>  # Approve
You can also configure an allowlist of user Open IDs via channels.feishu.allowFrom.

Group Access

Group policy is controlled via channels.feishu.groupPolicy:
  • "open" — Allow all users in the group (default)
  • "allowlist" — Only allow users in groupAllowFrom
  • "disabled" — Disable group messages
By default, the bot only responds when @mentioned (requireMention: true).

Common Commands

CommandDescription
openclaw gateway statusCheck gateway status
openclaw gateway restartRestart gateway service
openclaw logs --followView real-time logs
openclaw pairing list feishuView pending pairing requests
openclaw plugins listView installed plugins

Troubleshooting

IssueSolution
Bot not responding in groupsCheck if you @mentioned the bot; check if groupPolicy is "disabled"
Bot not receiving messagesCheck if the app is published and approved; verify event subscription im.message.receive_v1 is configured; confirm WebSocket long connection mode is selected
App Secret leakedReset App Secret on Feishu Open Platform, update config, restart gateway
Failed to send messagesCheck if im:message:send_as_bot permission is granted; check logs with openclaw logs --follow