← 返回
沟通协作 中文

multi-account-config

Configure multiple messaging platform accounts for OpenClaw. Use when the user wants to add or configure additional accounts for Telegram, WhatsApp, Discord,...
为 OpenClaw 配置多个消息平台账户。用于添加或配置 Telegram、WhatsApp、Discord 等额外账户。
devilsen
沟通协作 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 511
下载
💾 8
安装
1
版本
#latest

概述

Multi-Account Configuration

Guide users through configuring multiple accounts for messaging platforms in OpenClaw.

Supported Platforms

  • Telegram
  • WhatsApp
  • Discord
  • Slack
  • Signal
  • Other OpenClaw-supported channels

Workflow

Step 1: Identify Platform

Ask the user which platform they want to configure:

> "你想配置哪个平台的多账号?支持的选项:Telegram、WhatsApp、Discord、Slack、Signal 等。"

Step 2: Collect Account Information

For each account, collect:

  1. Account ID/Name - A short identifier (e.g., "work", "personal", "friendA")
  2. Platform-specific credentials:
    • Telegram: Bot Token (from @BotFather)
    • WhatsApp: Pairing code or existing credentials
    • Discord: Bot Token
    • Slack: Bot Token
    • Signal: Phone number

Suggest meaningful names based on use case:

  • "work" - 工作相关
  • "personal" - 个人使用
  • "side-project" - 副业项目
  • "family" - 家人群组

Step 3: Get Current Config

Use gateway config.get to retrieve current configuration.

Step 4: Build Updated Config

Structure the configuration following this pattern:

{
  "bindings": [
    {
      "agentId": "main",
      "match": {
        "channel": "<platform>",
        "accountId": "<account-id>"
      }
    }
  ],
  "channels": {
    "<platform>": {
      "enabled": true,
      "accounts": {
        "<account-id>": {
          "name": "<Display Name>",
          "enabled": true,
          "dmPolicy": "allowlist",
          "allowFrom": ["<user-id>"],
          "botToken": "<token>",
          "groupPolicy": "open",
          "streaming": "block"
        }
      }
    }
  }
}

Step 5: Apply Configuration

Use gateway config.patch to apply the new configuration.

Step 6: Verify

Confirm the configuration was applied successfully and provide next steps.

Configuration Schema Reference

Bindings

Each account needs a binding entry:

{
  "agentId": "main",
  "match": {
    "channel": "telegram",
    "accountId": "work"
  }
}

Account Properties

PropertyTypeDescription
-----------------------------
namestringDisplay name for the account
enabledbooleanWhether the account is active
dmPolicystring"allowlist", "blocklist", or "open"
allowFromarrayList of allowed sender IDs (for allowlist)
botTokenstringPlatform-specific token
groupPolicystring"open", "closed", or "admin-only"
streamingstring"block" or "allow"

Example: Adding Telegram Work Account

User provides:

  • Platform: Telegram
  • Account name: work
  • Bot Token: 123456:ABC-DEF...

Configuration to add:

{
  "bindings": [
    {
      "agentId": "main",
      "match": {
        "channel": "telegram",
        "accountId": "work"
      }
    }
  ],
  "channels": {
    "telegram": {
      "enabled": true,
      "accounts": {
        "work": {
          "name": "Work",
          "enabled": true,
          "dmPolicy": "allowlist",
          "allowFrom": ["USER_ID"],
          "botToken": "123456:ABC-DEF...",
          "groupPolicy": "open",
          "streaming": "block"
        }
      }
    }
  }
}

Important Notes

  1. Preserve existing accounts - When adding new accounts, merge with existing config
  2. Get user ID from context - Use the current user's sender ID for allowFrom
  3. Validate tokens - Ensure tokens are complete and properly formatted
  4. Restart required - Configuration changes require gateway restart to take effect
  5. Security - Never log or expose tokens in responses

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 22:45 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,718
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,670
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,577