Query group information
Description
With this API, you can query group information, including group name, group notice, group avatar, group mute information, group specification limits, group creation time, and group attributes.
Request method and endpoint
- Request method: POST
- Request URL:
https://zim-api.zego.im/?Action=QueryGroupInfo
- Protocol: HTTPS
- Rate limit: 20 requests/second
Request parameters
Listed below are the parameters specific to this request and part of the common request parameters. For the complete list of common request parameters, see Accessing Server APIs - Common parameters.
Parameter | Type | Required | Description |
---|---|---|---|
FromUserId | String | Yes | The user ID of the queryer. (The user has logged in ZIM service through the login method in the client, or has completed registration through the server API.) |
GroupId | String | Yes | The group ID of the query target. |
Request example
-
Request URL:
Untitledhttps://zim-api.zego.im/?Action=QueryGroupInfo &<公共请求参数>
1 -
Request body:
Untitled{ "FromUserId": "userId", "GroupId": "groupId" }
1
Response parameters
Parameter | Type | Description |
---|---|---|
Code | Number | Return code. |
Message | String | Operation result description. |
RequestId | String | Request ID. |
GroupName | String | Group name. |
GroupNotice | String | Group notice. |
GroupDataSeq | Number | Number of group data modifications. |
GroupAvatar | String | Group avatar address. |
IsAllForbid | Bool | Whether all members are muted.
|
ForbidList | Number | The muted group roles.
|
LimitInfo | Object | Group specification limits. |
└MemberCountLimit | Number | Maximum number of group members. |
└JoinMode | Number | Group joining mode:
|
└InviteMode | Number | Invitation mode:
|
└BeInvitedMode | Number | Invitation acceptance mode:
|
└NumberMessage | Number | Number of historical messages that new members can pull after joining the group. |
ForbidExpireTime | Number | Unix timestamp when the mute expires, in milliseconds (ms). |
GroupCreateTime | Number | Unix timestamp when the group was created, in milliseconds (ms). |
GroupId | String | Group ID. |
GroupAttributes | Array of Object | List of group attributes. |
└Key | String | Key of the group attribute. |
└Value | String | Value of the group attribute. |
Note
IsAllForbid
and ForbidList
cannot exist simultaneously.
Response example
Untitled
{
"Code": 0,
"Message": "success",
"RequestId": "343649807833778782",
"GroupName": "GroupName",
"GroupNotice": "GroupNotice",
"GroupDataSeq": 1,
"GroupAvatar": "https://xxx.com/xxx.png",
"IsAllForbid": true,
"ForbidList": [2,3],
"LimitInfo": {
"MemberCountLimit": 100,
"JoinMode": 1,
"InviteMode": 1,
"BeInvitedMode": 1,
"NumberMessage": 100
},
"ForbidExpireTime": 1000,
"GroupCreateTime": 10000,
"GroupId": "GroupId",
"GroupAttributes": [
{
"Key": "1",
"Value": "1"
},
{
"Key": "2",
"Value": "2"
}
]
}
1
Return codes
The following return codes are only listed for the interface business logic. For the complete list of return codes, see Global return codes.
Return code | Description | Solution |
---|---|---|
660000002 | Invalid input parameters. | Please check the input parameters. |
660300005 | The frequency of calling the interface exceeds the AppID level limit. | Please try again later. |
660500002 | The operator user is not registered. | Please register the ZIM service first. |