# OpenClaw Integration Guide

OpenClaw is an open-source personal AI assistant framework that connects the same AI backend to multiple chat platforms such as DingTalk, Feishu, WeChat, and QQ. This guide explains how to configure OpenClaw to use models provided by the UModelverse platform.

## **System Requirements**

| Platform | Requirements |
| --- | --- |
| Windows | Windows 10 or Windows 11 |
| macOS | macOS 10.15 (Catalina) or later |
| Linux | Ubuntu 18.04+, CentOS 7+, Debian 9+ |

All platforms require:

-   Node.js 22+ (OpenClaw has strict Node version requirements; do not use a version below 22)
    
-   Network connection
    

## **1. Install OpenClaw**

First, verify that your local Node.js version meets the requirement:

```
node --version
```

If the output shows a version below 22, or if the command is not found, go to the [Node.js official website](https://nodejs.org/) to install or upgrade before continuing.

### macOS / Linux

You can use the official one-line install script:

```
curl -fsSL https://openclaw.ai/install.sh | bash
```

Or install via npm:

```
npm install -g openclaw@latest
```

### Windows

Run the official script in PowerShell:

```
iwr -useb https://openclaw.ai/install.ps1 | iex
```

Or use npm:

```
npm install -g openclaw@latest
```

### Setup Wizard

After installation, the setup wizard launches automatically (you can also re-enter it at any time with `openclaw onboard`). Since the model and channel will be configured manually in later steps, follow the table below to get through the wizard first:

| **Option** | **Recommended Selection** |
| --- | --- |
| I understand this is powerful and inherently risky. Continue? | **Yes** |
| Onboarding mode | **QuickStart** |
| Model/auth provider | **Skip for now** |
| Filter models by provider | **All providers** |
| Default model | **Keep current** |
| Select channel (QuickStart) | **Skip for now** |
| Configure skills now? (recommended) | **No** |
| Enable hooks? | Press Space to select, then Enter |
| How do you want to hatch your bot? | **Do this later** |

## **2. Configure the UModelverse API**

All OpenClaw configuration is stored in a single file, `~/.openclaw/openclaw.json`, which is loaded automatically at startup. Prepare your credentials first, then use either the terminal or Web UI method below to write them in.

### 2.1 Prepare Credentials

Go to the [UModelverse Console](https://console.ucloud.cn/modelverse/api) to obtain an API Key, and note the following information:

| Item | Value |
| --- | --- |
| API Key | Obtained from the [UModelverse Console](https://console.ucloud.cn/modelverse/api) |
| Base URL | `https://api-us-ca.umodelverse.ai` |
| API Type | `anthropic-messages` |
| Available Models | [Models supported](https://api-us-ca.umodelverse.ai/v1/models) by the UModelverse platform |

> **About gateway authentication:** The example below uses `auth.mode: none`, meaning the local gateway requires no authentication. This is only suitable for single-machine personal use. If you plan to share access or connect remotely, run `openclaw doctor --fix` to enable token-based authentication.

### 2.2 Option 1: Edit the Configuration File (Recommended)

1.  Open the configuration file:
    
    ```
    nano ~/.openclaw/openclaw.json
    ```
    
2.  Enter the content below, replacing `YOUR_API_KEY` with your UModelverse API Key. If the file already contains other configuration, only add or adjust the `providers` and `agents` fields — **do not overwrite the entire file**.
    
    ```
    {
      "models": {
        "mode": "merge",
        "providers": {
          "umodelverse": {
            "baseUrl": "https://api-us-ca.umodelverse.ai",
            "apiKey": "YOUR_API_KEY",
            "api": "anthropic-messages",
            "models": [
              {
                "id": "claude-sonnet-4-6",
                "name": "claude-sonnet-4-6",
                "reasoning": true,
                "input": ["text", "image"],
                "contextWindow": 200000,
                "maxTokens": 65536,
                "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
              },
              {
                "id": "claude-opus-4-8",
                "name": "claude-opus-4-8",
                "reasoning": true,
                "input": ["text", "image"],
                "contextWindow": 200000,
                "maxTokens": 65536,
                "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
              }
            ]
          }
        }
      },
      "agents": {
        "defaults": {
          "model": {
            "primary": "umodelverse/claude-sonnet-4-6"
          },
          "models": {
            "umodelverse/claude-sonnet-4-6": {},
            "umodelverse/claude-opus-4-8": {}
          }
        }
      },
      "gateway": {
        "mode": "local",
        "auth": { "mode": "none" }
      }
    }
    ```
    
    > The `models` list above contains only two example entries. You can add or remove entries based on the [models supported](https://api-us-ca.umodelverse.ai/v1/models) by the UModelverse platform. Make sure the list in `agents.defaults.models` matches the models declared in `providers`.
    
3.  Save and exit: press `Ctrl+X`, then `Y`, then `Enter`.
    
4.  Restart the gateway to apply the configuration:
    
    ```
    openclaw gateway restart
    ```
    

### 2.3 Option 2: Edit via the Web UI

> The Web UI is only available in OpenClaw **version 2026.3.28 and earlier**. For newer versions, use Option 1.

1.  Start the dashboard:
    
    ```
    openclaw dashboard
    ```
    
    In the browser, go to **Settings** in the left sidebar and switch the editor from **Form** to **Raw** mode.
    
2.  Paste the same JSON from Option 1 into the editor, remembering to replace `YOUR_API_KEY`.
    
3.  Click **Save** to write to disk, then click **Apply** to restart the gateway and apply the changes.

## **3. Connect Messaging Channels**

Once the model is configured, you can connect OpenClaw to your preferred chat applications. The channels below are described separately — choose whichever you need; they do not interfere with each other.

### DingTalk

**Step 1: Create an application and obtain credentials**

1.  Log in to the [DingTalk Open Platform](https://open-dev.dingtalk.com/) and select an organization where you have developer permissions (create one if needed).
    
2.  Go to **Applications** → **Create Application** from the top menu, fill in a name (e.g., "AI Assistant") and description, then save.
    
3.  Under **Add Application Capabilities**, add **Bot**, enable the bot toggle, fill in the required fields, keep the **Message Receiving Mode** at the default **Stream Mode**, and click **Publish**.
    
4.  Open **Credentials & Basic Info** and record the Client ID and Client Secret.
    
5.  Go to **Version Management & Release**, create a new version, set the visibility scope, save, and publish.
    

**Step 2: Install the DingTalk plugin**

```
openclaw plugins install @soimy/dingtalk
```

After installation, run `openclaw plugins list` to confirm that `dingtalk` shows a `loaded` status.

**Step 3: Write the channel configuration**

Add the `channels` and `plugins.allow` sections to `~/.openclaw/openclaw.json`, replacing `YOUR_DINGTALK_APPKEY` and `YOUR_DINGTALK_APPSECRET` with the credentials from the previous step. This is an addition to the existing configuration — do not touch the existing `models` and `agents` fields:

```
{
  "channels": {
    "dingtalk": {
      "enabled": true,
      "clientId": "YOUR_DINGTALK_APPKEY",
      "clientSecret": "YOUR_DINGTALK_APPSECRET",
      "robotCode": "YOUR_DINGTALK_APPKEY",
      "dmPolicy": "open",
      "groupPolicy": "open",
      "messageType": "markdown"
    }
  },
  "plugins": {
    "allow": ["dingtalk"],
    "entries": {
      "dingtalk": {
        "enabled": true
      }
    }
  }
}
```

> The example sets both `dmPolicy` and `groupPolicy` to `open` for easy self-testing. For production use, it is recommended to change these to `allowlist` and restrict access to specific users and groups via a whitelist.

**Step 4: Restart and verify**

```
openclaw gateway restart
```

Run `openclaw status`; when DingTalk in the Channels section shows `ON` and `OK - configured`, the bot is ready. Then try @mentioning the bot in a DingTalk group to test it.

### Feishu

**Step 1: Create a Feishu application**

1.  Open the [Feishu Open Platform](https://open.feishu.cn/app), click **Create Internal App**, fill in the name and description, and create.
    
2.  Under **Credentials & Basic Info**, copy the **App ID** (in the form `cli_xxx`) and the **App Secret**.
    
3.  Go to **Permission Management** → **Bulk Import/Export Permissions**, paste the permission list below, confirm the additions, and apply for activation:
    

```
{
  "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: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"]
  }
}
```

4.  Find the **Bot** card under application capabilities and click **Configure**.
    
5.  Set up event subscriptions: under **Events & Callbacks** → **Subscription Method**, select **Receive Events via Long Connection** and save. Then click **Add Event**, search for `im.message.receive_v1`, and confirm adding it.
    
6.  Under **Version Management & Release**, create a version, fill in the version number and notes, submit for review, and publish.
    

**Step 2: Configure the Feishu bot**

Run the interactive command and follow the prompts:

```
openclaw channels add
```

Select **Feishu**, enter the **App ID**, and enter the **App Secret** in sequence. After completing this, restart the gateway. When you send a private message to the bot, it will reply with a message containing a **pairing code** — copy the last line and send it in the OpenClaw conversation to complete pairing.

**Step 3: Restart and verify**

```
openclaw gateway restart
```

Run `openclaw status`; when Feishu in Channels shows `ON` and `OK`, the bot is ready. Test it by sending a message in Feishu.

### WeChat

> Ensure your WeChat client version is 8.0.70 or later.

**Step 1: Install the WeChat plugin**

```
npx -y @tencent-weixin/openclaw-weixin-cli@latest install
```

After the command runs, the terminal will display a QR code — scan it with WeChat to complete binding. Upon successful binding, the ClawBot chat window will open automatically. Then run `openclaw plugins list` to confirm that `openclaw-weixin` shows `loaded`.

**Step 2: Restart and verify**

```
openclaw gateway restart
```

Find ClawBot in WeChat and send a message to test.

### QQ

**Step 1: Install the QQ plugin**

```
openclaw plugins install @sliverp/qqbot
```

Run `openclaw plugins list` to confirm that `qqbot` shows `loaded`.

**Step 2: Create a QQ bot**

1.  Register and log in to a developer account on the [QQ Open Platform](https://q.qq.com/#/).
    
2.  Create a bot via the [OpenClaw dedicated page](https://q.qq.com/qqbot/openclaw/index.html) to obtain the AppID and AppSecret.
    
    > The AppSecret cannot be viewed in plaintext after creation; viewing it again will force a reset. Be sure to save it securely when you first create the bot.
    

**Step 3: Write the channel configuration**

Append the following to `~/.openclaw/openclaw.json`, replacing `YOUR_APP_ID` and `YOUR_APP_SECRET`. Again, be careful not to overwrite the existing `models` and `agents` fields:

```
{
  "channels": {
    "qqbot": {
      "enabled": true,
      "appId": "YOUR_APP_ID",
      "clientSecret": "YOUR_APP_SECRET",
      "dmPolicy": "open",
      "allowFrom": ["*"]
    }
  },
  "plugins": {
    "allow": ["qqbot"],
    "entries": {
      "qqbot": {
        "enabled": true,
        "config": {}
      }
    }
  }
}
```

`dmPolicy: open` allows all direct messages, and `allowFrom: ["*"]` allows all users — suitable for self-testing. For production use, narrow these settings as appropriate. After making changes, restart the gateway and send a message to the bot in QQ to test:

```
openclaw gateway restart
```

## **4. Common Commands**

The following commands are available at any time within a conversation:

| Command | Purpose | Example |
| --- | --- | --- |
| /help | View a quick command reference | /help |
| /status | View model, session, gateway, and other status | /status |
| /model <model-name> | Switch the model for the current session | /model claude-opus-4-8 |
| /new | Start a new session | /new |
| /compact | Compress history to free up context space | /compact |
| /think <level> | Adjust reasoning depth (off / low / medium / high) | /think high |
| /skills | List available Skills | /skills |

## **FAQ**

### How do I see which models are currently configured?

Run `openclaw tui` to enter the terminal interface, then type `/model` to browse the model list. Press Enter to select a model and Esc to exit.

### Error: "HTTP 401: Incorrect API key provided." or "No API key found for provider xxx"

This is usually a key or cache issue:

1.  Confirm that the API Key is from the UModelverse platform, was copied in full with no extra spaces, and that the subscription is active and has not expired or been entered incorrectly.
    
2.  If the issue is caused by a stale cache, delete the `providers` field from `~/.openclaw/agents/main/agent/models.json` and restart OpenClaw.
    

### I've already connected a channel. How do I safely add a new model without losing the existing configuration?

The key is to **never replace the entire file** — only make targeted changes:

-   If OpenClaw is still responding normally, ask it directly in the conversation to help you merge the configuration.
    
-   If it cannot respond, manually edit `~/.openclaw/openclaw.json`, changing only the fields that need to change and leaving everything else as-is.
    

After making changes, restart the gateway. If an old session becomes unresponsive, simply start a new session.

### Error: device identity required

The full error looks like:

```
... code=1008 reason=device identity required
```

**Cause:** The device identity is missing when connecting to the gateway. This commonly occurs on first access before pairing, after browser cache is cleared, or after the keys under `~/.openclaw/identity/` are lost due to reinstallation or an upgrade.

**Resolution:** First approve the current device and regenerate the access URL:

```
openclaw devices approve --latest
openclaw dashboard --no-open
```

If that does not work, clear the problematic device records and try again:

```
openclaw devices clear --pending --yes
openclaw dashboard --no-open
```

Finally, run `openclaw devices list` and confirm that the device appears in the Paired list — that indicates everything is working correctly.
