Crie sua conta grátis e teste por 7 dias ( não precisa adicionar cartão de crédito )

Obter Tickets do Contato

Obter Tickets do Contato

Obter Tickets do Contato
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://painel.robomensageiro.com.br/api/contacts/alltickets',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
    "number":"5511978097649"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer tokenmeu'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Retorno com sucesso:

JSON
[
    {
        "id": 366,
        "status": "pending",
        "unreadMessages": 0,
        "lastMessage": "Pagamento recebido para renovação mensal do sistema",
        "protocolo": "4533",
        "typebot_sessionId": null,
        "typebot_status": "on",
        "customA": null,
        "customB": null,
        "isGroup": false,
        "userId": null,
        "contactId": 4192,
        "whatsappId": 1,
        "queueId": 20,
        "chatbot": false,
        "channel": "whatsapp",
        "queueOptionId": null,
        "companyId": 1,
        "uuid": "a0351e1c-f8ba-4a0d-ab8a-f8e03610c28c",
        "createdAt": "2023-08-31T16:36:13.315Z",
        "updatedAt": "2023-12-10T18:19:45.299Z"
    },
    {
        "id": 357,
        "status": "open",
        "unreadMessages": 0,
        "lastMessage": "D",
        "protocolo": "2928",
        "typebot_sessionId": "clp2wnhow00mjlh085cy4izj9",
        "typebot_status": "on",
        "customA": "CAMPO LIVRE LETRAS E NÚMEROS",
        "customB": "CAMPO LIVRE LETRAS E NÚMEROS",
        "isGroup": false,
        "userId": 1,
        "contactId": 4192,
        "whatsappId": 2,
        "queueId": 50,
        "chatbot": false,
        "channel": "whatsapp",
        "queueOptionId": null,
        "companyId": 1,
        "uuid": "cabd8ddd-f5e1-43ab-8661-7b0385ca4e1b",
        "createdAt": "2023-08-30T02:27:15.376Z",
        "updatedAt": "2023-12-09T01:14:21.120Z"
    },
    {
        "id": 427,
        "status": "open",
        "unreadMessages": 0,
        "lastMessage": "D",
        "protocolo": "1248",
        "typebot_sessionId": null,
        "typebot_status": null,
        "customA": null,
        "customB": null,
        "isGroup": false,
        "userId": 1,
        "contactId": 4192,
        "whatsappId": 17,
        "queueId": 21,
        "chatbot": null,
        "channel": "whatsapp",
        "queueOptionId": null,
        "companyId": 1,
        "uuid": "2af58dae-cd1b-45cd-a844-ad0ae09106a1",
        "createdAt": "2023-09-12T01:33:43.420Z",
        "updatedAt": "2023-12-09T01:25:55.207Z"
    },
    {
        "id": 3978,
        "status": "closed",
        "unreadMessages": 0,
        "lastMessage": "*Rodrigo:*\n32432432",
        "protocolo": "4628",
        "typebot_sessionId": null,
        "typebot_status": "on",
        "customA": null,
        "customB": null,
        "isGroup": false,
        "userId": null,
        "contactId": 4192,
        "whatsappId": 67,
        "queueId": null,
        "chatbot": false,
        "channel": "whatsapp",
        "queueOptionId": 5,
        "companyId": 1,
        "uuid": "bf686813-65ec-4081-a895-9e17f13e82d0",
        "createdAt": "2023-12-07T14:20:59.404Z",
        "updatedAt": "2023-12-10T15:55:50.672Z"
    }
]
Atendimento por WhatsAppAtendimento
WhatsApp