← 返回
未分类 Key

企业微信对话配置

Set up WeCom (企业微信) as a chat channel for OpenClaw using the official Tencent plugin with WebSocket long-polling. Use when user wants to connect WeCom bot, c...
使用官方腾讯插件,将企业微信(WeCom)配置为 OpenClaw 的聊天渠道,采用 WebSocket 长轮询。用于用户想要连接 WeCom 机器人的场景。
pengtruman922-dotcom pengtruman922-dotcom 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 460
下载
💾 1
安装
1
版本
#latest

概述

WeCom Channel Setup

Connect OpenClaw to WeCom (企业微信) via the official Tencent WebSocket plugin.

Prerequisites

  • OpenClaw >= 2026.2.13
  • A WeCom AI Bot created at WeCom Open Platform
  • Bot API mode: 长连接 (WebSocket long-polling, no domain/IP required)
  • Bot ID and Secret from the bot management page

> 📖 Full WeCom AI Bot docs: https://open.work.weixin.qq.com/help?doc_id=21657

Setup Steps

1. Install the plugin

openclaw plugins install @wecom/wecom-openclaw-plugin

Wait for installation to complete. A security warning about "Environment variable access combined with network send" is expected — the plugin needs the bot secret to establish WebSocket connections.

2. Configure the channel

Edit ~/.openclaw/openclaw.json. Add wecom under channels:

{
  "channels": {
    "wecom": {
      "enabled": true,
      "botId": "<YOUR_BOT_ID>",
      "secret": "<YOUR_BOT_SECRET>",
      "dmPolicy": "open",
      "allowFrom": ["*"],
      "groupPolicy": "open"
    }
  }
}

Also ensure the plugin is allowed and enabled under plugins:

{
  "plugins": {
    "allow": ["wecom-openclaw-plugin"],
    "entries": {
      "wecom-openclaw-plugin": {
        "enabled": true
      }
    }
  }
}

3. Verify the model configuration

The WeCom channel uses the global default model (agents.defaults.model.primary). Confirm it points to a provider with sufficient credits:

openclaw models status

If the default model's provider has no balance, update the primary:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "<provider>/<model>"
      }
    }
  }
}

4. Restart the gateway

openclaw gateway restart

If the restart exits with code 1 or produces no output (common on Windows), verify health manually:

# PowerShell
Invoke-WebRequest -Uri http://localhost:<port>/health -UseBasicParsing | Select-Object -ExpandProperty Content
# Expected: {"ok":true,"status":"live"}

5. Test

Send a message to the bot in WeCom. It should reply within a few seconds.

Troubleshooting

SymptomCauseFix
---------
billing error — API key has run out of creditsDefault model provider has no balanceChange agents.defaults.model.primary to a funded provider, restart gateway
doctor warning: allowFromdmPolicy: "open" requires allowFrom: ["*"]Add "allowFrom": ["*"] to wecom config
Bot connects but no replyGateway cached old configFull stop + start: openclaw gateway stop, wait 5s, openclaw gateway start
Windows CLI outputs nothingPowerShell encoding issueUse --plain flag or check health via HTTP directly

Access Control Options

SettingValuesDefaultNotes
------------
dmPolicypairing / open / allowlist / disabledopenControls who can DM the bot
allowFromArray of user IDs or ["*"][]Required when dmPolicy is open
groupPolicyopen / allowlist / disabledopenControls group chat access
groupAllowFromArray of group IDs[]Used with groupPolicy: "allowlist"
sendThinkingMessagetrue / falsetrueShow "thinking…" placeholder while processing

Restrict to specific users (DM)

{
  "channels": {
    "wecom": {
      "dmPolicy": "allowlist",
      "allowFrom": ["user_id_1", "user_id_2"]
    }
  }
}

Restrict to specific groups

{
  "channels": {
    "wecom": {
      "groupPolicy": "allowlist",
      "groupAllowFrom": ["group_id_1"]
    }
  }
}

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 10:45 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 859 📥 337,501
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,145 📥 919,957
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,498 📥 563,178