From 9d1ff4438c403f174f8e6b9e2a8794c04e7af2c7 Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Wed, 11 Mar 2026 14:29:33 +0800 Subject: [PATCH 1/3] feat: add OpenClaw integration guide for OpenIM --- docs/guides/solution/openclaw.md | 11 +++-------- docs/restapi/commonFields.md | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/guides/solution/openclaw.md b/docs/guides/solution/openclaw.md index 85b7e8a749..59270bdf5c 100644 --- a/docs/guides/solution/openclaw.md +++ b/docs/guides/solution/openclaw.md @@ -6,20 +6,15 @@ sidebar_position: 8 # 如何接入OpenClaw -本文面向使用 OpenIM 的用户,说明如何通过 OpenClaw Gateway 接入 OpenIM,并完成“发送第一条消息”的验证。 +本文面向使用 OpenIMSDK 的用户,说明如何通过 OpenClaw Gateway 接入 OpenIMServer,并完成“发送第一条消息”的验证。 ## 1. 前置条件 - 你已部署并启动 OpenClaw Gateway,并能在运行 Gateway 的机器上执行 `openclaw` 命令。 -- 你已从管理员/运维/业务系统获取以下 OpenIM 连接信息: - - `userID`:OpenClaw 在 OpenIM 中使用的用户 ID - - `wsAddr`:OpenIM SDK WebSocket 地址(例如:`ws://127.0.0.1:10001`) - - `apiAddr`:OpenIM REST API 地址(例如:`http://127.0.0.1:10002`) - - `platformID`:平台 ID(需与签发该 Token 时使用的 platformID 一致) ## 2. 准备用户 Token -### 1.注册用户 +### 1.注册OpenClaw用户 登陆管理后台,默认地址为`http://server_ip:11002`,`server_ip`为`open-im-server`部署地址ip。 @@ -40,7 +35,7 @@ sidebar_position: 8 ### 获取用户token -拿到管理员 token 后,参考 [获取用户 Token](../../restapi/apis/authenticationManagement/getUserToken) 文档为指定用户签发登录 token。userID填写刚刚注册的用户的userID,platformID建议填写12。 +拿到管理员 token 后,参考 [获取用户 Token](../../restapi/apis/authenticationManagement/getUserToken) 文档为指定用户签发登录 token。userID填写刚刚注册的用户的userID,platformID填写12(表示bot)。 ## 3. 安装 OpenIM Channel 插件 diff --git a/docs/restapi/commonFields.md b/docs/restapi/commonFields.md index 4d35d64167..6e01f2023e 100644 --- a/docs/restapi/commonFields.md +++ b/docs/restapi/commonFields.md @@ -7,7 +7,7 @@ title: 常用字段说明 | 字段名 | 类型 | 字符串长度限制 | 说明 | 取值说明 | | -------------- | ------ | -------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | secret | string | 32 | 服务端秘钥 | 字符串 | -| platformID | int | | 用户登录时的终端类型 | 1:iOS, 2:Android, 3:Windows, 4:OSX, 5:Web, 6:MiniWeb, 7:Linux, 8:APad, 9:IPad, 10:Admin, 11:HarmonyOS,12:Bot| +| platformID | int | | 用户登录时的终端类型 | 1:iOS, 2:Android, 3:Windows, 4:OSX, 5:Web, 6:MiniWeb, 7:Linux, 8:APad, 9:IPad, 10:Admin, 11:HarmonyOS| | userID | string | 64 | 用户ID,保证唯一,不能包含特殊字符 | 字符串 | | nickname | string | 255 | 昵称 | 字符串 | | faceURL | string | 255 | 头像URL | URL 链接 | From 4e618b204c06fc6f2999e54c18b23859653936aa Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Wed, 11 Mar 2026 14:52:55 +0800 Subject: [PATCH 2/3] feat: add OpenClaw integration guide for OpenIM --- docs/guides/solution/openclaw.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guides/solution/openclaw.md b/docs/guides/solution/openclaw.md index 59270bdf5c..85ddcc4947 100644 --- a/docs/guides/solution/openclaw.md +++ b/docs/guides/solution/openclaw.md @@ -10,11 +10,11 @@ sidebar_position: 8 ## 1. 前置条件 -- 你已部署并启动 OpenClaw Gateway,并能在运行 Gateway 的机器上执行 `openclaw` 命令。 +- 你已经[部署了OpenIMServer 和 ChatServer](../gettingStarted/dockerCompose.md),已部署并启动 OpenClaw Gateway,并能在运行 Gateway 的机器上执行 `openclaw` 命令。 -## 2. 准备用户 Token +## 2. 注册OpenClaw用户 -### 1.注册OpenClaw用户 +### 1.注册用户 登陆管理后台,默认地址为`http://server_ip:11002`,`server_ip`为`open-im-server`部署地址ip。 From d1f1d20fd4bfb5fa01c02cfbe49a9fc9fea7e1a2 Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Wed, 11 Mar 2026 14:59:56 +0800 Subject: [PATCH 3/3] feat: add OpenClaw integration guide for OpenIM --- docs/guides/solution/openclaw.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/guides/solution/openclaw.md b/docs/guides/solution/openclaw.md index 85ddcc4947..f8e556cce1 100644 --- a/docs/guides/solution/openclaw.md +++ b/docs/guides/solution/openclaw.md @@ -10,7 +10,7 @@ sidebar_position: 8 ## 1. 前置条件 -- 你已经[部署了OpenIMServer 和 ChatServer](../gettingStarted/dockerCompose.md),已部署并启动 OpenClaw Gateway,并能在运行 Gateway 的机器上执行 `openclaw` 命令。 +- 你已经[部署了OpenIMServer 和 ChatServer](../gettingStarted/dockerCompose),已部署并启动 OpenClaw Gateway,并能在运行 Gateway 的机器上执行 `openclaw` 命令。 ## 2. 注册OpenClaw用户 @@ -27,8 +27,6 @@ sidebar_position: 8 - - ### 获取管理员token 参考 [获取管理员 Token](../../restapi/apis/authenticationManagement/getAdminToken) 文档获取管理员 token。