logo
In-app Chat
On this page

Fetch the list of groups that are muted in the app


Description

This API is used to query the IDs of all groups that are muted in the app, including groups that are muted globally, by group roles, or by user IDs.

This API returns 10,000 groups by default each time. If you need to adjust this, please contact ZEGO technical support.

Request method and endpoint

  • Request method: POST
  • Request URL: https://zim-api.zego.im/?Action=FetchForbidGroupList
  • 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.

ParameterTypeRequiredDescription
FromUserIdStringYesThe 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.)
StartFlagNumberYesThe pagination flag. Fill 0 for the first time, and fill the NextFlag value returned last time for subsequent calls. When the NextFlag is 0, it means that the group list has been fetched.

Request example

  • Request URL:
Untitled
https://zim-api.zego.im/?Action=FetchForbidGroupList
&<Common request parameters>
1
Copied!
  • Request body:
Untitled
{
    "FromUserId": "userId",
    "StartFlag": 0
}
1
Copied!

Response parameters

ParameterTypeDescription
CodeNumberReturn code.
MessageStringOperation result description.
RequestIdStringRequest ID.
FetchEndNumberWhether the list has been fetched:
  • 0: No.
  • 1: Yes.
NextFlagNumber
  • When FetchEnd is 0, it means that there are more groups that can be fetched, and the StartFlag can be used as the StartFlag for the next interface call.
  • When FetchEnd is 1, it means that the list has been fetched, and this field should be ignored at this time.
GroupListArray of ObjectThe list of groups that are muted.
└GroupIdStringThe group ID.
└ForbidTypeNumberThe type of mute:
  • 1: Global mute.
  • 2: Mute by group role.
  • 4: Mute by user ID.
If multiple mute types exist, ForbidType will add these values together, for example, when both global mute (1) and mute by group role (2) exist, ForbidType is 3.

Response example

Untitled
{
    "Code": 0,
    "Message": "success",
    "RequestId": "343649807833778782",
    "FetchEnd": 1,
    "NextFlag": 100000,
    "GroupList": [
        {
            "GroupId": "group_1",
            "ForbidType": 1
        },
        {
            "GroupId": "group_2",
            "ForbidType": 5
        }
    ]
}
1
Copied!

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 codeDescriptionSolution
660000002Invalid input parameters.Please check the input parameters.
660000003Logical processing error.Please try again, or contact ZEGO technical support.
660000011The number of users exceeds the limit.Please check the input user list.

Previous

Mute group members

Next

Disband a group conversation