docs: correct htsy API field types, names, and CLI examples

This commit is contained in:
dcsunny
2026-07-02 09:29:31 +08:00
parent 1f4a00a0b0
commit 7d9f09c0bf
8 changed files with 92 additions and 71 deletions
+7 -4
View File
@@ -17,7 +17,7 @@
| 分组-列表 | `POST /api/bot/wx/category/list` | `page`(int64, 可选,page)`pageSize`(int64, 可选,pageSize)`name`(string, 可选,分组名字)`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated CategoryItem,分组列表)`page`(int64page)`pageSize`(int64pageSize)`total`(int64total)`last`(boollast) |
| 分组-添加机器人 | `POST /api/bot/wx/category/botAdd` | `id`(int64, 必填,分组id)`botIds`(repeated int64, 必填,组内-机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
| 分组-删除机器人 | `POST /api/bot/wx/category/botDel` | `id`(int64, 必填,分组id)`botIds`(repeated int64, 必填,组内-机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
| 子账号拥有的机器人列表 | `POST /api/bot/wx/user/list` | `userId`(int64, 必填,子账号id)`page`(int64, 必填,page)`pageSize`(int64, 必填,pageSize)`botName`(string, 可选,机器人名字)`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpBotInfo组内群列表)`page`(int64page)`pageSize`(int64pageSize)`total`(int64total)`last`(boollast) |
| 子账号拥有的机器人列表 | `POST /api/bot/wx/user/list` | `userId`(int64, 必填,子账号id)`page`(int64, 必填,page)`pageSize`(int64, 必填,pageSize)`botName`(string, 可选,机器人名字)`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpBotInfo机器人列表)`page`(int64page)`pageSize`(int64pageSize)`total`(int64total)`last`(boollast) |
| 修改机器人描述 | `POST /api/bot/wx/remark/update` | `id`(int64, 必填,机器人id)`remark`(string, 必填,备注)`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
| 修改机器人备注名 | `POST /api/bot/wx/name/update` | `id`(int64, 必填,机器人id)`name`(string, 必填,别名)`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
| 消息发送统计-根据日期 | `POST /api/bot/wx/stats/msgSendData/byDate` | `date`(string, 可选,日期,不传默认为今日);`botId`(int64, 必填,机器人id)`botType`(int32, 必填,类型 1 个微 2企微) | `msgNum`(int64,消息发送数量)`groupNum`(int64,在多少个群发送)`friendNum`(int64,给多少个好友发消息)`planNum`(int64,参与计划数) |
@@ -32,14 +32,14 @@
| 获取账号下的所有企微号的所在主体,需要主体id则需要从这里获取 | `POST /api/bot/wx/corp/list` | `{}` | `list`(repeated CorpInfoItem) |
| 更新微号的状态 | `POST /api/bot/wx/updateBotStatus` | `botId`(int64, 必填,微号id)`botStatus`(int32, 必填,微号状态 0正常 1封禁);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
| 微号管理-清空所有指令 | `POST /api/bot/wx/cleanAll/cmd` | `botId`(int64, 必填,微号id)`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
| 微号扫码添加好友 | `POST /api/bot/wx/scanQrcode/addFriend` | `botId`(int64, 必填,微号id)`botType`(int64, 必填,机器人类型 1是个微 2企微) | 空对象或无业务数据 |
| 微号扫码添加好友 | `POST /api/bot/wx/scanQrcode/addFriend` | `botId`(int64, 必填,微号id)`botType`(int32, 必填,机器人类型 1是个微 2企微) | 空对象或无业务数据 |
| 迁移微号 | `POST /api/bot/wx/transferBot` | `botIds`(repeated int64, 可选)`targetAccountId`(int64, 可选)`botType`(int32, 可选) | `successIds`(repeated int64,成功Id列表)`failList`(repeated failItem,失败列表) |
| 联系人统计,目前只有客户数 | `POST /api/bot/wx/contactStats` | `ids`(repeated int64, 可选)`botType`(int32, 必填,机器人类型 1是个微 2是企微) | `list`(repeated ContactStatsStatsItem,列表) |
| 登录码-自动登录 | `POST /api/bot/wx/login/autoLogin` | `botKey`(string, 必填,botKey)`botType`(int32, 必填,机器人类型 1是个微 2是企微);`addressId`(string, 可选,代理地址) | 空对象或无业务数据 |
| 登录码-推送确认登录 | `POST /api/bot/wx/login/push/confirmLogin` | `botKey`(string, 必填,botKey)`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
| 解除微号异常 | `POST /api/bot/wx/releaseAbnormal` | `botIds`(repeated int64, 必填,微号ids)`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
| 微号管理-微号休眠状态变更 | `POST /api/bot/wx/sleep/update` | `botIds`(repeated int64, 必填,微号id)`isSleep`(bool, 必填,是否休眠 true 是 false 否)`botType`(int32, 可选) | `list`(repeated HttpWxbotSleepStatusUpdateItem) |
| 微号管理-微号扫码进群 | `POST /api/bot/wx/scanQrcode/joinGroup` | `botId`(int64, 必填,微号id)`botType`(int64, 必填,机器人类型 1是个微 2企微);`qrcodeUrl`(string, 可选,二维码的链接);`groupUrl`(string, 可选,二维码扫描出来的群链接) | 空对象或无业务数据 |
| 微号管理-微号扫码进群 | `POST /api/bot/wx/scanQrcode/joinGroup` | `botId`(int64, 必填,微号id)`botType`(int32, 必填,机器人类型 1是个微 2企微);`qrcodeUrl`(string, 可选,二维码的链接);`groupUrl`(string, 可选,二维码扫描出来的群链接) | 空对象或无业务数据 |
| 云端h5-获取登录二维码 | `POST /api/bot/wx/login/h5/getQrcode` | `botKey`(string, 必填,botKey)`addressId`(string, 可选,代理的城市代码);`loginType`(int64, 必填,登录类型 0默认服务器登录 1 微蜂的app登录);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`clientVersion`(string, 必填,客户端版本 4.1.12 和 4.1.16)`clientPlatform`(int32, 必填,客户端平台类型 1 mac 2 pc 3 ipad)`token`(string, 可选,h5获取二维码的时候,授权token) | `code`(string,登录码)`expireTime`(int64,二维码的过期时间 多少秒) |
| 云端h5-获取登录二维码登录状态 | `POST /api/bot/wx/login/h5/scanStatus` | `botKey`(string, 必填,botKey)`botType`(int32, 必填,机器人类型 1是个微 2是企微) | `wxStatus`(int32,扫码状态,1 等待 2 成功 4取消);`authStatus`(int32,授权状态 1成功 2失败);`failReason`(string,失败原因)`needVerifyCode`(bool,是否需要登录验证码)`authUrl`(string,验证链接)`loginAuthParam`(LoginAuthParam,登录验证参数)`authQrcode`(string,验证二维码 app扫码) |
| 云端h5-新登录发送验证码 | `POST /api/bot/wx/login/h5/codeVerify` | `botKey`(string, 必填,botKey)`botType`(int32, 必填,机器人类型 1是个微 2是企微);`code`(string, 必填,验证码) | 空对象或无业务数据 |
@@ -51,10 +51,13 @@
## 常用示例
查询微号列表:
查询微号列表`botType` 决定查询的是个微还是企微,**查企微必须传 `botType:2`**;账号下若没有个微号,照搬个微示例会得到 `total:0`
```bash
# 个微微号列表
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":1}'
# 企微微号列表
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":2}'
```
发送文本消息: