logo
In-app Chat
ZIMAudio
On this page

CheckUsersIsInBlacklist

POST

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

By calling this API, you can batch check the blocklist relationship between one user and up to 20 other users (whether these users have been blocked). If you need to increase the limit, please contact ZEGOCLOUD Technical Support.

Note

The users corresponding to the parameters FromUserId and UserId 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: [CheckUsersIsInBlacklist]

    API prototype parameter

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

    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

    Query blocklist relationships for this user.

    UserIds string[]required

    Possible values: <= 20

    List of target users to check blocklist relationships. Default maximum is 20.

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 check the blocklist relationship between FromUserId and multiple users at the same time:

    • If the blocklist relationship between FromUserId and 1 or more users is successfully checked, Code will return 0. In this case, please refer to the specific information in ErrList to confirm the operation result.
    • If the blocklist relationship between FromUserId and all target users fails to be checked, 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.
    660700015The target user of the API 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.
    660800039The incoming user list exceeds the limit.Please shorten the incoming user list.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    Succ object[]
    Check success list.
  • Array[
  • UserId string

    Successfully checked the blocklist relationship between FromUserId and this user ID.

    Result number

    Possible values: [0, 1]

    Check result:

    • 0: Not blocked by FromUserId.
    • 1: Blocked by FromUserId.
  • ]
  • ErrList object[]
    Check failure list.
    • Code is 0:
    • ErrList is empty, indicating that the blocklist relationship between FromUserId and all target users is successfully checked.
    • ErrList is not empty, indicating that the blocklist relationship check between FromUserId and some target users failed. 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 the blocklist relationship check between FromUserId and all target users failed.
  • Array[
  • UserId string

    Failed to check the blocklist relationship between FromUserId and this user ID.

    SubCode number

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

  • ]

Previous

Query the blocklist

Next

Delete friends

On this page

Back to top