跳到主要内容

获取群组成员

分页获取群聊中的成员列表。

接口说明

项目说明
地址https://api-coco.typex.im/open/robot/group_members
方法POST
Content-Typeapplication/json

请求头

Authorization: Bearer <bot_token>
Content-Type: application/json

请求参数

参数类型必填说明
chat_idstring群组会话id
pageint页码
page_sizeint每页返回的成员数

请求示例

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"
}