# 获取机器人所在的群列表

该接口用于获取所拥有的机器人列表所在的群列表

请求方式:POST

请求地址:https://$basehost/gateway/qopen/GetRobotGroupList

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": false
            }
        ]
    },
    "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/GetRobotGroupList \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{
        "robot_id": "机器人id",
        "offset": 0,
        "limit": 10
      }'
最后更新时间: 2023/6/12 15:41:01