logo
In-app Chat
On this page

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.

ParameterTypeRequiredDescription
FromUserIdStringYesThe user ID to query.
LimitNumberYesThe number of groups returned per page. The maximum value is 100.
NextStringNoThe 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

ParameterTypeDescription
CodeNumberThe return code.
MessageStringThe return status information.
RequestIdStringThe request ID.
NextRspStringThe pagination flag for the next page. If it is 0, it means there is no more data.
HasJoinGroupNumint64The number of groups the user has joined.
GroupInfoListArray Of ObjectThe list of group information the user has joined.

GroupInfoList is as follows:

ParameterTypeDescription
GroupIdStringThe group ID.
GroupNameStringThe group name.
GroupAvatarStringThe 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 CodeDescriptionSolution
660000002Parameter error.Please check the parameters.
660300005Frequency limit.Please try again later.
660500002The operator user is not registered.Please register the requested user first.

Previous

Query user information

Next

Register users

On this page

Back to top