Query group information of user joined
Description
Query the group information that a specific user has joined.
Request method and endpoint
- Request method: POST
- Request URL:
https://zim-api.zego.im/?Action=QueryGroupsInfoOfUser
- Protocol: HTTPS
- Rate limit: 20 times/second.
Request Parameters
The following table only lists the API request parameters and some common parameters. For the complete list of common parameters, please refer to How to call - Common request parameters.
Parameter | Type | Required | Description |
---|---|---|---|
FromUserId | String | Yes | The user ID to query. |
Limit | Number | Yes | The number of groups returned per page. The maximum value is 100. |
Next | String | No | The pagination flag. For the first request, fill in an empty string to get the first page. For subsequent requests, fill in the value of NextRsp from the previous response to get the next page. |
Sample request
{
"FromUserId": "UserId123",
"Limit": "2",
"Next": ""
}
Response parameters
Parameter | Type | Description |
---|---|---|
Code | Number | The return code. |
Message | String | The return status information. |
RequestId | String | The request ID. |
NextRsp | String | The pagination flag for the next page. If it is 0, it means there is no more data. |
HasJoinGroupNum | int64 | The number of groups the user has joined. |
GroupInfoList | Array Of Object | The list of group information the user has joined. |
GroupInfoList is as follows:
Parameter | Type | Description |
---|---|---|
GroupId | String | The group ID. |
GroupName | String | The group name. |
GroupAvatar | String | The group avatar. |
Sample response
{
"Code": 0,
"Message": "success",
"RequestId": "req-123456789",
"NextRsp": "3",
"HasJoinGroupNum": 21,
"GroupInfoList": [
{
"GroupId": "groupId1",
"GroupName": "groupName1",
"GroupAvatar": "GroupAvatar1",
},
{
"GroupId": "groupId2",
"GroupName": "groupName2",
"GroupAvatar": "GroupAvatar2",
}
]
}
Return Codes
The following only lists the return codes related to the interface business logic. For the complete list of return codes, please refer to Return codes.
Return Code | Description | Solution |
---|---|---|
660000002 | Parameter error. | Please check the parameters. |
660300005 | Frequency limit. | Please try again later. |
660500002 | The operator user is not registered. | Please register the requested user first. |