Account and device status Webhook on whapi channels and session status
This section is in progress. It will be ready soon!
The health object contains information about the uptime of the channel and the status of the channel. Sent on event "channels.post
"
Copy {
"health": {
"start_at": 1713774883,
"uptime": 1,
"status": {
"code": 1,
"text": "INIT"
},
"version": "1.8.3-74-gf7df472"
},
"event": {
"type": "channel",
"event": "post"
},
"channel_id": "MANTIS-M72HC"
}
Copy {
"health": {
"start_at": 1713774883,
"uptime": 77,
"status": {
"code": 2,
"text": "LAUNCH"
},
"version": "1.8.3-74-gf7df472"
},
"event": {
"type": "channel",
"event": "post"
},
"channel_id": "MANTIS-M72HC"
}
Copy {
"health": {
"start_at": 1713774883,
"uptime": 78,
"status": {
"code": 3,
"text": "QR"
},
"version": "1.8.3-74-gf7df472"
},
"event": {
"type": "channel",
"event": "post"
},
"channel_id": "MANTIS-M72HC"
}
Copy {
"health": {
"start_at": 1713774883,
"uptime": 89,
"status": {
"code": 5,
"text": "ERROR"
},
"version": "1.8.3-74-gf7df472"
},
"event": {
"type": "channel",
"event": "post"
},
"channel_id": "MANTIS-M72HC"
}
The QR code object contains the QR code image and the status of the QR code. The QR code is only valid for a limited time. Sent on event "channels.patch
"
You can also use a webhook to track the connection/disconnection of an account to a channel. To do this, use the users.post
and users.delete
settings.
Copy {
"user": {
"id": "61371989950",
"name": "Jonathan"
},
"event": {
"type": "users",
"event": "post"
},
"channel_id": "MANTIS-M72HC"
}
Copy {
"user": {
"id": "61371989950",
"name": "Jonathan"
},
"event": {
"type": "users",
"event": "delete"
},
"channel_id": "MANTIS-M72HC"
}