API - SISTEMA | BAILEYS | OFIC...
Status das Conexões
1min
PHP
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6 CURLOPT_URL => 'https://{BACKEND_URL}/api/whatsapp-status/',
7 CURLOPT_RETURNTRANSFER => true,
8 CURLOPT_ENCODING => '',
9 CURLOPT_MAXREDIRS => 10,
10 CURLOPT_TIMEOUT => 0,
11 CURLOPT_FOLLOWLOCATION => true,
12 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13 CURLOPT_CUSTOMREQUEST => 'POST',
14 CURLOPT_HTTPHEADER => array(
15 'Content-Type: application/json',
16 'Authorization: Bearer tokenmeu'
17 ),
18));
19
20$response = curl_exec($curl);
21
22curl_close($curl);
23echo $response;
24
JSON
1{
2 "whatsapps": [
3 {
4 "id": 111,
5 "name": "Whaticket Saas Whitelabel",
6 "qrcode": "",
7 "status": "CONNECTED",
8 "channel": "whatsapp",
9 "battery": null,
10 "plugged": null,
11 "retries": 0,
12 "greetingMessage": "",
13 "farewellMessage": "",
14 "complationMessage": "",
15 "outOfHoursMessage": "",
16 "ratingMessage": "",
17 "closeMessage": "Encerrar por inatividade",
18 "provider": "stable",
19 "isDefault": false,
20 "companyId": 1,
21 "token": null,
22 "hubtoken": "X",
23 "webhook": null,
24 "ignoreNumbers": null,
25 "number": "",
26 "selectedInterval": 0,
27 "selectedMoveQueueId": null,
28 "excluded": null,
29 "excludedwpw": null,
30 "ixcrandom": null,
31 "markasread": null,
32 "importmessages": null,
33 "coverImage": null,
34 "inatividade": 0,
35 "removido": false,
36 "createdAt": "2023-12-27T19:08:29.267Z",
37 "updatedAt": "2024-02-12T16:28:48.935Z",
38 "queues": [
39 {
40 "id": 50,
41 "name": "TYPEBOT",
42 "color": "#73d8ff",
43 "greetingMessage": "*TESTE* Olá! Obrigado por entrar em contato.\n\nAguarde um instante enquanto localizo as opções para você!\n\n",
44 "WhatsappQueue": {
45 "whatsappId": 111,
46 "queueId": 50,
47 "createdAt": "2024-02-11T21:41:37.576Z",
48 "updatedAt": "2024-02-11T21:41:37.576Z"
49 }
50 }
51 ]
52 }
53 ]
54}
Updated 13 Feb 2024
Did this page help you?