群组类型 ID | 是否支持此 REST API |
Private | 支持,同新版本中的 Work(好友工作群) |
Public | 支持 |
ChatRoom | 支持,同新版本中的 Meeting(临时会议群) |
AVChatRoom | 不支持 |
Community(社群) | 支持 |
https://xxxxxx/v4/group_open_http_svc/get_specified_group_member_info?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
参数 | 说明 |
https | 请求协议为 HTTPS,请求方式为 POST |
xxxxxx | SDKAppID 所在国家/地区对应的专属域名 中国: console.tim.qq.com 新加坡: adminapisgp.im.qcloud.com 首尔: adminapikr.im.qcloud.com 法兰克福: adminapiger.im.qcloud.com 硅谷: adminapiusa.im.qcloud.com 雅加达: adminapiidn.im.qcloud.com |
v4/group_open_http_svc/get_specified_group_member_info | 请求接口 |
sdkappid | 创建应用时即时通信 IM 控制台分配的 SDKAppID |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295 |
contenttype | 请求格式固定值为 json |
{"GroupId":"@TGS#2KIFZCIPQ", // 群组 ID(必填)"Member_List_Account" : ["bob","peter"] // 指定群成员UserID列表(必填)}
{"GroupId":"@TGS#2KIFZCIPQ", // 群组 ID(必填)"Member_List_Account" : ["bob","peter"], // 指定群成员UserID列表(必填)"MemberInfoFilter": [ // 需要获取哪些信息(Member_Account 被默认包含在其中),如果没有该字段则为群成员全部资料"Role","JoinTime","MsgSeq","MsgFlag","LastSendMsgTime","MuteUntil","NameCard","OnlineStatus"]}
{"GroupId":"@TGS#2KIFZCIPQ", // 群组 ID(必填)"Member_List_Account" : ["bob","peter","John"], // 指定群成员UserID列表(必填)"MemberRoleFilter":[ // 群成员身份过滤器"Owner","Member"]}
{"GroupId":"@TGS#2KIFZCIPQ", // 群组 ID(必填)"Member_List_Account" : ["bob","peter"], // 指定群成员UserID列表(必填)"AppDefinedDataFilter_GroupMember": [ // 群成员自定义字段过滤器"group_member_p" // 群成员自定义字段Key]}
{"GroupId":"@TGS#2KIFZCIPQ", // 群组 ID(必填)"Member_List_Account" : ["bob","peter"], // 指定群成员UserID列表(必填)"MemberInfoFilter": [ // 需要获取哪些信息,如果没有该字段则为群成员全部资料"Role","JoinTime","MsgSeq","MsgFlag","LastSendMsgTime","MuteUntil","NameCard"],"MemberRoleFilter":[ // 群成员身份过滤器"Owner","Member"],"AppDefinedDataFilter_GroupMember": [ // 群成员自定义字段过滤器"group_member_p", // 群成员自定义字段 Key"group_member_p2"]}
字段 | 类型 | 属性 | 说明 |
GroupId | String | 必填 | 需要拉取成员信息的群组的 ID。 |
Member_List_Account | Array | 必填 | 需要拉取指定群成员的UserID列表,数量不得超过50。 |
MemberInfoFilter | Array | 选填 | |
MemberRoleFilter | Array | 选填 | 拉取指定身份的群成员资料。如没有填写该字段,默认为所有身份成员资料,成员身份可以为:“Owner”,“Admin”,“Member”。 |
AppDefinedDataFilter_GroupMember | Array | 选填 |
{"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","GroupId": "@TGS#2KIFZCIPQ","MemberList": [ //群成员列表{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923, // 入群时间"LastSendMsgTime": 1728973475, // 最后一次发消息时间"Member_Account": "bob","MsgFlag": "AcceptAndNotify","MsgSeq": 7,"MuteUntil": 1728977081, // 禁言截止时间(秒数)"NameCard": "bob","Role": "Member"},{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923,"LastSendMsgTime": 1728973184,"Member_Account": "peter","MsgFlag": "AcceptAndNotify","MsgSeq": 3,"MuteUntil": 0, // 0表示未被禁言,否则为禁言的截止时间"NameCard": "Peter","Role": "Member"}]}
{"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","GroupId": "@TGS#2KIFZCIPQ","MemberList": [ // 群成员列表{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923, // 入群时间"LastSendMsgTime": 1728973475, // 最后一次发消息的时间"Member_Account": "bob","MsgFlag": "AcceptAndNotify","MsgSeq": 7,"MuteUntil": 1728977081, // 禁言截至时间(秒数)"NameCard": "bob","OnlineStatus": "Online","Role": "Member"},{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923,"LastSendMsgTime": 1728973184,"Member_Account": "peter","MsgFlag": "AcceptAndNotify","MsgSeq": 3,"MuteUntil": 0, // 0表示未被禁言,否则为禁言的截止时间"NameCard": "Peter","OnlineStatus": "Offline","Role": "Member"}]}
{"ActionStatus": "OK", // 返回成功"ErrorCode": 0, // 返回码"ErrorInfo": "","GroupId": "@TGS#2KIFZCIPQ","MemberList": [{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923, // 成员加入时间"LastSendMsgTime": 1728973184, // 成员最后发消息时间"Member_Account": "peter", // 成员账号"MsgFlag": "AcceptAndNotify", // 成员消息屏蔽类型"MsgSeq": 7, // 成员已读消息 seq"MuteUntil": 0, // 0表示未被禁言,否则为禁言的截止时间"NameCard": "Peter", // 成员名片"Role": "Member" // 成员身份},{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": ""},{"Key": "group_member_p2","Value": ""}],"JoinTime": 1728964631,"LastSendMsgTime": 0,"Member_Account": "John","MsgFlag": "AcceptAndNotify","MsgSeq": 4,"MuteUntil": 0,"NameCard": "","Role": "Owner"},{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923,"LastSendMsgTime": 1728973475,"Member_Account": "bob","MsgFlag": "AcceptAndNotify","MsgSeq": 7,"MuteUntil": 1728977081, // 禁言的截止时间(秒数)"NameCard": "bob","Role": "Member"}]}
{"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","GroupId": "@TGS#2KIFZCIPQ","MemberList": [ // 群成员列表{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"}],"JoinTime": 1728964923, // 入群时间"LastSendMsgTime": 1728973475, // 最后一次发消息的时间"Member_Account": "bob","MsgFlag": "AcceptAndNotify","MsgSeq": 7,"MuteUntil": 1728977081, // 禁言截至时间(秒数)"NameCard": "bob","Role": "Member"},{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"}],"JoinTime": 1728964923,"LastSendMsgTime": 1728973184,"Member_Account": "peter","MsgFlag": "AcceptAndNotify","MsgSeq": 7,"MuteUntil": 0, // 0表示未被禁言,否则为禁言的截止时间"NameCard": "Peter","Role": "Member",}]}
{"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","GroupId": "@TGS#2KIFZCIPQ","MemberList": [ // 群成员列表{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923, // 入群时间"LastSendMsgTime": 1728973184, // 最后一次发消息时间"Member_Account": "peter","MsgFlag": "AcceptAndNotify","MsgSeq": 7,"MuteUntil": 0, // 0表示未被禁言,否则为禁言的截止时间"NameCard": "Peter","Role": "Member"},{"AppMemberDefinedData": [ // 群成员自定义字段{"Key": "group_member_p","Value": "the value"},{"Key": "group_member_p2","Value": "the value2"}],"JoinTime": 1728964923,"LastSendMsgTime": 1728973475,"Member_Account": "bob","MsgFlag": "AcceptAndNotify","MsgSeq": 7,"MuteUntil": 1728977081, // 禁言截至时间(秒数)"NameCard": "bob","Role": "Member",}]}
字段 | 类型 | 说明 |
ActionStatus | String | 请求处理的结果,OK 表示处理成功,FAIL 表示失败 |
ErrorCode | Integer | 错误码,0表示成功,非0表示失败 |
ErrorInfo | String | 错误信息 |
GroupId | String | 需要拉取成员信息的群组的 ID |
MemberList | Array | |
AppMemberDefinedData | Array | 返回的群成员自定义字段信息 |
错误码 | 描述 |
10002 | 服务器内部错误,请重试 |
10003 | 请求命令字非法 |
10004 | 参数非法,请根据错误描述检查请求是否正确 |
10005 | 查询的群成员数量超过50,请确保请求群成员数量不超过50 |
10007 | 操作权限不足,请确认操作者是否是 App 管理员或者是否有权限读取请求中的字段 |
10010 | 群组不存在,或者曾经存在过,但是目前已经被解散 |
10015 | 群组 ID 非法,请检查群组 ID 是否填写正确 |
本页内容是否解决了您的问题?