Muting and Unmuting Group Members

Last updated: 2020-11-06 18:18:33

    Feature Description

    • The app admin can mute certain group members for a specific period of time.
    • The app admin can unmute certain group members.
    • After muted users exit from and then enter a group again, they remain muted.

    API Invocation Description

    Applicable group types

    Group Type ID Is this RESTful API Supported?
    Private NO. Same as Work (work group for friends) in the new version.
    Public Yes.
    ChatRoom Yes. Same as Meeting (temporary meeting group) in the new version.
    AVChatRoom Yes.

    IM provides the preceding five built-in group types. For details on these types, see Group Systems.

    • Private group members cannot be muted.
    • In a BChatRoom group, only the app admin can send messages. Therefore, muting and unmuting are unnecessary in this case.

    Request URL example

    Request parameters

    The following table describes only the parameters that are modified when this API is invoked. For details on other parameters, see RESTful API Overview.

    Parameter Description
    v4/group_open_http_svc/forbid_send_msg Request API
    sdkappid SDKAppID assigned by the IM console when an app is created
    identifier It must be an app admin account. For details, see App Admins.
    usersig The signature generated by the app admin account. For details, see Generating UserSig.
    random Enter a random 32-bit unsigned integer ranging from 0 to 4294967295.

    Maximum invocation frequency

    The maximum invocation frequency is 200 times per second.

    Request packet example

    • Configuring muting
      Set ShutUpTime to a specific period of time to mute specified users.
        "GroupId": "@TGS#2C5SZEAEF",
        "Members_Account": [ // Support a maximum of 500 accounts.
        "ShutUpTime": 60 // Set the muting period in seconds.
    • Canceling muting
      To cancel muting, set ShutUpTime to 0.
        "GroupId": "@TGS#2C5SZEAEF",
        "Members_Account": [ // Support a maximum of 500 accounts.
        "ShutUpTime": 0 // The 0 value indicates that muting is canceled.

    Request packet fields

    Field Type Attribute Description
    GroupId String Required The ID of the group to be queried.
    Members_Account Array Required User accounts to be muted. Up to 500 accounts can be muted.
    ShutUpTime Integer Required The muting period in seconds. The 0 value indicates that muting is canceled.

    Response packet example

        "ActionStatus": "OK",
        "ErrorInfo": "",
        "ErrorCode": 0

    Response packet fields

    Field Type Description
    ActionStatus String The request processing result. OK: succeeded. FAIL: failed.
    ErrorCode Integer The error code. 0: succeeded. Others: failed.
    ErrorInfo String Error information.

    Error Codes

    Unless a network error (such as error 502) occurs, the HTTP return code for this API is always 200. ErrorCode and ErrorInfo in the response packet represent the actual error code and error information, respectively.
    For common error codes (60000 to 79999), see Error Codes.
    The following table describes the error codes specific to this API:

    Error Code Description
    10002 An internal server error occurred. In this case, try again.
    10003 A request command keyword is invalid.
    10004 A parameter is invalid. In this case, check whether the request is correct based on the error description.
    10007 The operation permissions are insufficient. For example, a common member in a public group tries to delete other users, but only the app admin can do so.
    10010 The group does not exist or has been dismissed.
    10015 The group ID is invalid. In this case, check whether the group ID is correct.

    API Commissioning Tool

    Use the RESTful online commissioning tool for APIs to commission this API.


    Obtaining the list of muted group members (v4/group_open_http_svc/get_group_shutted_uin)

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback