Get User Status

Use this API to retrieve the user status

Parameters

ParametersValueDescription
Authorization{{PARTNER_APP_TOKEN}}Access Token for the application
appId{{APP_ID}}Unique Identifier for Gupshup App
phone91xxxxxxxxxxPhone number to check optin status

Sample Request

curl --location --request GET 'https://partner.gupshup.io/partner/app/{{APP_ID}}/userStatus?phone={{PHONE_NUMBER}}' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}'

Sample Response

  {
        "userStatus": {
            "active": false,
            "appId": "9e****0d-ad**-4***-**35-4cd*****fa**",
            "blocked": true,
            "countryCode": "91",
            "dialCode": "**********",
            "phone": "************",
            "status": "OPT_IN"
        }
    }

Status Codes

Status CodeResponseComments
Success
200{ "userStatus": { "active": false, "appId": "b8d8565a-b320-4492-bfb1-2264bee17e04", "blocked": false, "countryCode": "91", "dialCode": "9422032010", "phone": "919422032010", "status": "OPT_IN" } }
200{ "message": "Check User optin & User Preference. Please contact Gupshup team." }When user is not opted
Error
429{ "status": "error", "message": "Too Many Requests" }10 Requests per Minute
500{ "status": "error", "message": "Internal server error. Please try again later and If Issue still persist than contact Gupshup Dev Support" }For any Internal Error
Language
Click Try It! to start a request and see the response here!