Skip to content

Account status#

Incoming webhook of this type contains the account authorization status data

Webhook#

Webhook parameters#

Parameter Type Description
typeWebhook string Incoming webhook type. For webhooks of this type the parameter takes on the value stateInstanceChanged
instanceData object Account data
timestamp integer Event timestamp in UNIX format
stateInstance string Account state. Have variants:
notAuthorized - Account not authorized. For account authorization refer to Before you start section
authorized - Account authorized
blocked - Account banned
sleepMode - Status is out of date. Account is in sleep mode. The state is possible when the phone is switched off. After the phone is switched on, it may take up to 5 minutes for the account state to be changed to authorized.
starting - The account is in the process of starting up (service mode). An instance, server, or instance in maintenance mode is rebooting. It may take up to 5 minutes for the account state to be set to authorized.
yellowCard - Sending messages has been partially or completely suspended on the account due to spamming activity. Messages sent after receiving the status are stored in the queue to be sent for 24 hours. To continue running the instance, you need to do a reboot of the instance

instanceData object parameters

Parameter Type Description
idInstance integer Account Id
wid string Account Id in WhatsApp format
typeInstance string Account messenger type

Webhook body example#

{
    "typeWebhook":"stateInstanceChanged",
    "instanceData": {
        "idInstance": 1,
        "wid": "",
        "typeInstance":"whatsapp"
    },
    "timestamp": 1586700690,
    "stateInstance": "notAuthorized"
}