Instance
Introduction to Instance Webhook Events
This section provides details about instance-related webhook events in the Instance system. These events are crucial for monitoring and managing the status of the instance, the connection to WhatsApp and the updating of QR codes, allowing for effective and reactive integration with the system.
Events
connection.update
Structure
This event reports the status of the connection to WhatsApp. It is important for monitoring and managing connectivity between the instance and the WhatsApp service.
{
"event": "connections.update", // Event name
"instance": { // Instance details
"owner": "[email protected]",
"name": "codechat",
"id": "d4a58666-9737-485d-988b-d18a43ce8c75"
},
"date": {
"instance": { // Instance details
"name": "codechat",
"id": "unique id"
},
"state": "close" | "open" | "connecting" | "refused", // Connection state
"statusReason": 200 // Status reason
}
}
qrcode.updated
Structure
This event sends the base64 QR code for reading. It is essential for authentication and connection processes using QR code.
{
"event": "qrcode.updated", // Event name
"instance": { // Instance details
"owner": "[email protected]",
"name": "codechat",
"id": "d4a58666-9737-485d-988b-d18a43ce8c75"
},
"date": {
"name": "codechat",
"qrcode": {
"code": "2@J9pWS+08tuf2uUrFCw91UxzkLmuW+Zj34maKxF+hE+7 ...", // QR Code
"base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUwAAAFM ... AABJRU5ErkJggg==" // QR in base64
}
}
}