获取群组成员
分页获取群聊中的成员列表。
接口说明
| 项目 | 说明 |
|---|---|
| 地址 | https://api-coco.typex.im/open/robot/group_members |
| 方法 | POST |
| Content-Type | application/json |
请求头
Authorization: Bearer <bot_token>
Content-Type: application/json
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
chat_id | string | 是 | 群组会话id |
page | int | 是 | 页码 |
page_size | int | 是 | 每页返回的成员数 |
请求示例
curl --location 'https://api-coco.typex.im/open/robot/group_members' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <bot_token>' \
--data '{
"chat_id": "1000000000000000000",
"page": 1,
"page_size": 100
}'
响应格式
{
"code": 0,
"data": {
"has_more": false,
"members": [
{
"name": "Alice Example",
"user_id": "1000000000000000001"
},
{
"name": "Bob Example",
"user_id": "1000000000000000002"
},
{
"name": "Carol Example",
"user_id": "1000000000000000003"
}
],
"page": 1,
"page_size": 100,
"total": 3
},
"msg": "ok"
}