logo
In-app Chat
ZIMAudio
On this page

QueryBlacklist

GET

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

Paginate and retrieve all blocklist data based on user ID.

QPS Limit
20 times/s

Request

Query Parameters

    Action stringrequired

    Possible values: [QueryBlacklist]

    API prototype parameter

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

    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 the blocklist of this UserID (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).

    Limit numberrequired

    Possible values: >= 0 and <= 100

    How many users' information to retrieve at a time. Value range is [0, 100]. If not filled in or the value is 0 or greater than 100, the value is 100.

    Next numberrequired

    Pagination flag. Fill in 0 for the first time, and then fill in the Next value returned last time. When the returned Next is 0, it means the blocklist retrieval is complete.

    For example, if FromUserId has blocked 250 users, when calling this API to query:

    • First call: Limit is 100, Next is empty, query users 1 ~ 100; the Next value in the returned result is num1.
    • Second call: Limit is 100, Next is num1, query users 101 ~ 200; the Next value in the returned result is num2.
    • Third call: Limit is 100, Next is num2, query users 201 ~ 250; query is complete, the Next in the returned result is 0.

Responses

OK
Schema
    Code integer

    Return code.

    Return CodeDescriptionSuggested Solution
    660000002Parameter error.Please check the request 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.
    Message string

    Description of the request result.

    RequestId string

    Request ID.

    TotalCount int32

    Total number of current blocklist users.

    Next number

    Pagination flag. Non-zero means there is still blocklist information not returned, and this field needs to be set in the request parameter Next to retrieve more blocklist information; 0 means all blocklist information has been returned.

    Note

    In addition to the above description, this field has no association with the list information. Do not make any other logic based on this.

    Blacklist object[]
    Blocklist data list.
  • Array[
  • UserId string

    User ID.

    UserName string

    User name.

    Avatar string

    User avatar URL.

    UpdateTime number

    Block time in milliseconds (ms).

  • ]

Previous

Unblock users

Next

Check blockships

On this page

Back to top