# 获取机器人关注群列表
该接口用于获取机器人已关注的群列表信息
请求方式:POST
请求地址:https://$basehost/gateway/qopen/GetRobotWatchGroupChatList
body参数:
{
"robot_id": "机器人id",
"offset": 0,
"limit": 10
}
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| robot_id | string | 是 | 机器人id |
| offset | int | 是 | 每次获取的的开始位置,最小值为0 |
| limit | int | 是 | 每次获取的条数,取值范围(1~100) |
返回值:
{
"data": {
"has_more": true,
"group_list": [
{
"group_id": "群id",
"name": "群名称",
"owner_name": "群主名称",
"owner_id": "accxdfdagggg",
"created_at": 1623055138,
"member_count": 10,
"is_watch": true,
}
]
},
"errcode": 0,
"errmsg": "",
"hint": ""
}
返回说明
| 字段 | 类型 | 说明 |
|---|---|---|
| errcode | int | 状态码,0为正常,非0代表错误 |
| errmsg | string | 错误信息 |
| data | json | json返回值 |
| has_more | bool | 是否还有更多 |
| group_list | array | 获取到的关注群列表 |
| hint | string | 请求日志ID |
group_list说明
| 字段 | 类型 | 说明 |
|---|---|---|
| group_id | string | 群id |
| name | string | 群名称 |
| owner_name | string | 群主名称 |
| owner_id | string | 群主id |
| created_at | int | 建群时间戳 |
| member_count | int | 群人数 |
| is_watch | bool | 是否关注群 |
完整请求示例:
curl -X POST \
https://$basehost/gateway/qopen/GetRobotWatchGroupChatList \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"robot_id": "机器人id",
"offset": 0,
"limit": 10
}'