MuteGroup
https://zim-api.zego.im/
By calling this API, you can mute or unmute all members or certain group roles in a group.
After the API is successfully called, all users in the group will learn which roles cannot speak in the group or can resume speaking through the following ZIM SDK callback interfaces:
| iOS | Android | macOS | Windows |
|---|---|---|---|
| groupMutedInfoUpdated | onGroupMutedInfoUpdated | groupMutedInfoUpdated | onGroupMutedInfoUpdated |
| Web | Mini Program | Flutter | React Native |
|---|---|---|---|
| groupMutedInfoUpdated | groupMutedInfoUpdated | onGroupMutedInfoUpdated | groupMutedInfoUpdated |
| uni-app | uni-app x | HarmonyOS |
|---|---|
| groupMutedInfoUpdated | groupMutedInfoUpdated |
If IsAllMuted, MuteRoleList, and Duration are all not passed, the mute status of all users in the group will be removed.
If Duration is non-zero and IsAllMuted is set to false, the passed MuteRoleList will overwrite the previously set muted role list.
The parameter FromUserId only supports numbers, English characters, and '!','#','$','%','&','(',')','+','\'',':',';','<','=','.','>','?', '@','[',']','^','_','{','}','|','~'.
If FromUserId is an administrator, MuteRoleList[] cannot contain 1 (group owner).
Request
Query Parameters
- 1: Group owner.
- 2: Administrator.
- 3: Group member.
- Other: Developer-defined group roles, recommended to be greater than 100.
- -1: Permanent.
- 0: Cancel all mutes at the group level.
- Greater than 0: Mute duration in seconds. Maximum support is 30 days (2,592,000 seconds). During the mute validity period, if the mute duration is set again, the mute status will be extended by the duration set in the most recent request.
Possible values: [MuteGroup]
API prototype parameter
https://zim-api.zego.im/?Action=MuteGroup
💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.
💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature example for how to generate.
💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature example for how to generate, with a maximum error of 10 minutes.
Possible values: [2.0]
Default value: 2.0
💡Public parameter. Signature version number.
💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.
Possible values: <= 32 characters
Operator user ID (who has logged in to the ZIM service by calling the login method on the client, or has completed registration by calling the server-side API).
Note
Since the mute operation will trigger a group tips message, when FromUserId is not a group member, developers need to hide the message or implement other processing to avoid confusion among group users.
Possible values: <= 32 characters
Group ID.
Default value: false
Whether to mute all members. Defaults to false if not passed.
List of muted roles. A single request can mute up to 20 group roles. Enumeration as follows:
Only meaningful when IsAllMuted is false or not passed
Mute duration. Defaults to 0 if not passed.
Responses
- 200
- application/json
