logo
In-app Chat
ZIMAudio
On this page

RemoveUsersFromBlacklist

POST

https://zim-api.zego.im/

By calling this API, you can batch remove 20 users from the blocklist for a user. If you need to increase the limit, please contact ZEGOCLOUD Technical Support.

After the API is successfully called, this user's client will receive blocklist update notifications through the following ZIM SDK callback interface:

iOSAndroidmacOSWindows
blacklistChangedonBlacklistChangedblacklistChangedonBlacklistChanged
WebMini ProgramFlutterReact Native
blacklistChangedblacklistChangedonBlacklistChangedblacklistChanged
uni-app | uni-app xHarmonyOS
blacklistChangedblacklistChanged
Note

The users corresponding to the parameters FromUserId and UserIds have logged in to the ZIM service by calling the login method on the client, or have completed registration by calling the server-side API.

Note
The parameters FromUserId and UserId only support numbers, English characters, and '!', '#', '$', '%', '&', '(', ')', '+', '-', ':', ';', '<', '=', '.', '>', '?', '@', '[', ']', '^', '_', '{', '}', '|', '~'
QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [RemoveUsersFromBlacklist]

    API prototype parameter

    https://zim-api.zego.im/?Action=RemoveUsersFromBlacklist

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature example for how to generate.

    Timestamp int64required

    💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature example for how to generate, with a maximum error of 10 minutes.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    Signature stringrequired

    💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.

Body

required
    FromUserId stringrequired

    Possible values: <= 32 characters

    Remove target users from the blocklist for this user.

    UserIds string[]required

    Possible values: <= 20

    List of target users to be removed from the blocklist. The default maximum is 20 strings. Each string has a maximum length of 32 bytes.

Responses

OK
Schema
    Code integer

    Return code.

    The following only lists the Code and SubCode related to the API business logic. For complete return codes, please refer to Global Return Codes.

    Note

    When you initiate a request to remove multiple users from the blocklist at the same time:

    • If 1 or more users are successfully removed, Code will return 0. In this case, please refer to the specific information in ErrList to confirm the operation result.
    • If all specified users fail to be removed, Code will return the relevant return code. For details, please refer to Global Return Codes.
    Code / SubCodeDescriptionSuggested Solution
    660000002Input parameter error。Please check the input parameters。
    660300005The API call frequency exceeds the AppID-level limit.Please try again later.
    660500002FromUserId is not registered.Please confirm whether the user is registered:
    If confirmed registered, please contact ZEGOCLOUD Technical Support for troubleshooting.
    If confirmed not registered, please register this user.
    660800001FromUserId is not registered.Please confirm whether the user is registered:
    If confirmed registered, please contact ZEGOCLOUD Technical Support for troubleshooting.
    If confirmed not registered, please register this user.
    660800038Cannot block FromUserId or remove FromUserId from the blocklist.Please modify UserIds.
    660800039The incoming user list exceeds the limit.Please shorten the incoming user list.
    660800042Failed to remove all specified users from the blocklist.Please refer to the SubCode of the response parameter ErrList for processing.
    660800043This user has been removed from the blocklist.No action required.
    660800044This user is not in the blocklist.No action required.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    ErrList object[]
    Failure information list.
    • Code is 0:
    • ErrList is empty, indicating that all specified users are successfully removed.
    • ErrList is not empty, indicating that some specified users failed to be removed from the blocklist. Please refer to SubCode for processing.
    • Code is not 0:
    • ErrList is empty, indicating parameter error, API frequency limit, or system error.
    • ErrList is not empty, indicating that all specified users failed to be removed from the blocklist.
  • Array[
  • UserId string

    Failed to remove this UserID from the blocklist.

    SubCode integer

    Specific failure return code. For complete return codes, please refer to the Code description or Global Return Codes.

  • ]

Previous

Block users

Next

Query the blocklist

On this page

Back to top