Get Blocked Users list

Use this API to get a list of users that have been blocked for the specified app.

Request Parameters

Key

Description

Value

Data type

Required/Optional

Constraints

Authorization

Access Token for the application

{{PARTNER_APP_TOKEN}}

String

Required

Should be a valid Partner App Access Token

appId

App ID to fetch the access token

{{APP_ID}}

String

Required

  • The Id should be a valid app Id of Gupshup.
  • The App must be associated with the account that owns the PARTNER_APP_TOKEN being used.

limit

Limits the number of blocked users returned in the response.

Integer

Optional

- its optional
- default value is 100 if not specified -maximum value is 100

after

Specifies the starting point for the next set of results. (Next page)

String

Optional

- its optional
- the value of this field is present in the response of the get request

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/{{APP_ID}}/user/blocklist?limit={{LIMIT}}&after={{AFTER}}' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}'

Sample Response

{
    "data": [
        {
            "messaging_product": "whatsapp",
            "wa_id": "919163805873"
        },
        {
            "messaging_product": "whatsapp",
            "wa_id": "918910864371"
        }
    ],
    "paging": {
        "cursors": {
            "after": "eyJvZAmZAzZAXQiOjEsInZAlcnNpb25JZACI6IjE3NDEyNTc3OTI1NjY1MDAifQZDZD",
            "before": "eyJvZAmZAzZAXQiOjAsInZAlcnNpb25JZACI6IjE3NDEyNTc3OTI1NjY1MDAifQZDZD"
        }
    },
    "status": "success"
}

Status Codes

Status Code

Response

Comments

Success

200

{

"data": [

{"messaging_product": "whatsapp", "wa_id": "919163805873" }, { "messaging_product": "whatsapp", "wa_id": "918910864371" } ], "paging": { "cursors": { "after": "eyJvZAmZAzZAXQiOjEsInZAlcnNpb25JZACI6IjE3NDEyNTc3OTI1NjY1MDAifQZDZD", "before": "eyJvZAmZAzZAXQiOjAsInZAlcnNpb25JZACI6IjE3NDEyNTc3OTI1NjY1MDAifQZDZD" } }, "status": "success" }

Language
Click Try It! to start a request and see the response here!