Mute group members
Overview
This interface allows you to mute or unmute specific members in a group.
After a successful API call, all users in the group will be notified through the following ZIM SDK callback interfaces to know which group members are unable to speak in the group or have their mute status lifted:
iOS | Android | macOS | Windows |
---|---|---|---|
groupMemberInfoUpdated | onGroupMemberInfoUpdated | groupMemberInfoUpdated | onGroupMemberInfoUpdated |
Web | Flutter | React Native | |
groupMemberInfoUpdated | groupMemberInfoUpdated | groupMemberInfoUpdated |
Operation prototype
- Request method: GET
- Request endpoint:
https://zim-api.zego.im/?Action=MuteGroupMembers
- Protocol: HTTPS
- Rate limit: 20 times/second
Request parameters
The following list only shows the request parameters for this interface and some public parameters. For a complete list of public parameters, please refer to [Accessing Server APIs - Public parameters](../Accessing%20Server%20APIs.mdx#Public parameters).
Parameter | Type | Required | Description |
---|---|---|---|
FromUserId | String | Yes | The ID of the operating user. |
GroupId | String | Yes | The ID of the group. |
UserIds[] | Array of String | Yes | A list of user IDs to mute or unmute in the group. Up to 20 user IDs can be passed in a single request. |
Duration | Number | No | The duration of the mute. If not passed, the default value is 0.
|
FromUserId
and UserIds
only support numbers, English characters, and the following special characters: '!', '#', '$', '%', '&', '(', ')', '+', '', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'.
Sample request
https://zim-api.zego.im/?Action=MuteGroupMembers
&<Common Request Parameters>
&FromUserId=user1
&GroupId=group
&UserIds[]=user2
&UserIds[]=user3
&Duration=100000
Response parameters
Parameter | Type | Description |
---|---|---|
Code | Number | The return code. |
Message | String | The description of the operation result. |
RequestId | String | The request ID. |
ErrorUsers | Array of Object | A list of failed users.
|
└UserId | String | The ID of the failed user. |
└SubCode | Number | The specific return code for the failure. |
Sample response
{
"Code": 0,
"Message": "success",
"RequestId": "343649807833778782"
}
Return codes
The following list only shows the return codes related to the business logic of the interface. For a complete list of return codes, please refer to Return codes.
Return Code | Description | Suggested Action |
---|---|---|
660000001 | Business related general error. | Please try again or contact ZEGOCLOUD Technical Support. |
660000002 | Invaild parameter. | The parameter entered is missing or invaild. Please check the parameters. |
660300005 | The call frequency of the interface exceeds the AppID level limit. | Please try again later. |
660600001 | The group does not exist. | Please check the GroupID . |
660600009 | Failed to obtain group-related information. | Please confirm the GroupID is correct. If it is correct, please contact ZEGO technical support. |
660600024 | FromUserId is not in the group. | Please check FromUserId or add FromUserId as a group member. |
660600032 | FromUserId does not have permission. | FromUserId needs to be the group owner or administrator. |
660600033 | All specified user operations failed. | Please check UserIds . |