Pular para o conteúdo principal

API Status das Conexões

🧩 Verificar status de TODAS as conexões da empresa.

API: Todas

Verifique aqui os Pré-Requisitos para utilizar APIs

Endpoint​
https://{BACKEND_URL}/api/whatsapp-status
Método​
POST
Autenticação​
Bearer {seutokenaqui}
Payload​
// sem payload

➡️ sem payload API Utilize o código em requisições HTTPS com ferramentas como cURL ou bibliotecas de integração.

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://{BACKEND_URL}/api/whatsapp-status',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer {seutokenaqui}' //Token cadastrado na conexão
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Retorno de API (Payload de Resposta)​

A API retorna todas as conexões da empresa, da qual a conexão (token) que fez a chamada pertence.

Cada objeto da resposta corresponde a uma empresa e suas propriedades. Veja um exemplo com 2 empresas (id 1 e id 23):

{
"whatsapps": [
{
"id": 1,
"name": "Principal",
"qrcode": "",
"status": "CONNECTED",
"channel": "whatsapp",
"whatsmeowurl": null,
"whatsmeowname": null,
"whatsmeowtoken": null,
"whatsmeowid": null,
"battery": null,
"plugged": null,
"retries": 0,
"greetingMessage": "",
"farewellMessage": "",
"complationMessage": "",
"outOfHoursMessage": "",
"ratingMessage": "",
"closeMessage": "",
"provider": "beta",
"isDefault": true,
"companyId": 1,
"token": "32183831i231u23u321u13u1exemplo",
"hubtoken": null,
"webhook": "https://go.dominio.com.br/webhook",
"ignoreNumbers": "",
"number": "5511999999999",
"selectedInterval": 0,
"selectedMoveQueueId": null,
"selectedCommentQueueId": null,
"excluded": 0,
"excludedwpw": 0,
"ixcrandom": 0,
"markasread": 1,
"importmessages": 0,
"coverImage": null,
"inatividade": 0,
"inatividadeNQ": 0,
"whavoip_token": null,
"removido": false,
"createdAt": "2025-01-20T13:40:06.216Z",
"updatedAt": "2025-02-28T09:00:11.909Z",
"queues": [
{
"id": 1,
"name": "# Inicial",
"color": "#ab149e",
"greetingMessage": "",
"WhatsappQueue": {
"whatsappId": 1,
"queueId": 1,
"createdAt": "2025-02-20T15:03:10.210Z",
"updatedAt": "2025-02-20T15:03:10.210Z"
}
}
]
},
{
"id": 23,
"name": "Campanha",
"qrcode": "2@GccyPxvlLtJl6bxbraRZCU5r3CHj8MxC68OrTJ+45syDCH9qj8M4TXnD5YiS+CmotIyw3aAYEdnzYqwQUZk3/1h14I=,qoY8xVobj9o7zQlXyRMvIJHTg+SNBTFEqc657dwsnhs=,09wia6geUq8cNenZ9C29lZvTFubDtkGwOsWf8dXeg0Q=,F6zwYrFfBZqwMmvj3Ylb2O1biclBu+jcm/AZ6sFK9Xs=",
"status": "DISCONNECTED",
"channel": "whatsapp",
"whatsmeowurl": null,
"whatsmeowname": null,
"whatsmeowtoken": null,
"whatsmeowid": null,
"battery": null,
"plugged": null,
"retries": 0,
"greetingMessage": "",
"farewellMessage": "",
"complationMessage": "",
"outOfHoursMessage": "",
"ratingMessage": "",
"closeMessage": "",
"provider": "beta",
"isDefault": false,
"companyId": 1,
"token": "zaza",
"hubtoken": null,
"webhook": "",
"ignoreNumbers": "",
"number": "",
"selectedInterval": 0,
"selectedMoveQueueId": null,
"selectedCommentQueueId": null,
"excluded": 0,
"excludedwpw": 0,
"ixcrandom": 0,
"markasread": 0,
"importmessages": 0,
"coverImage": null,
"inatividade": 0,
"inatividadeNQ": 0,
"whavoip_token": "",
"removido": false,
"createdAt": "2025-02-27T13:14:37.942Z",
"updatedAt": "2025-02-28T09:01:52.181Z",
"queues": []
}
]
}