Listagem de Mensagens

Método listmessages:

<?php

require __DIR__ . '/vendor/autoload.php';

use ZapMeTeam\Api\ZapMeApi;

$zapme = (new ZapMeApi)
        ->setApi('API')
        ->setSecret('CHAVE_SECRETA');

// utilizando o método listMessages
$zapme->listMessages()->getResult();

Exemplo de retorno deste método:

{
        "result": "success",
        "date": "2020-09-15 11:58:38",
        "status": 200,
        "status_result": "listed_successfully",
        "messages":
        [
                {
                        "id": "15",
                        "hash": "0d9a93a25a1bf681",
                        "message": "Testando Sistema",
                        "phone": "5511985850505",
                        "status": "queue",
                        "created": "2020-09-14 14:53:15",
                        "updated": "2020-09-14 14:53:15"
                },
                {
                        "id": "16",
                        "hash": "23b5190ef58d56fa",
                        "message": "Testando Sistema",
                        "phone": "5511985850505",
                        "status": "message_sent",
                        "created": "2020-09-14 15:08:46",
                        "updated": "2020-09-14 15:09:14"
                }
        ]
}

Explicação dos Parâmetros Obrigatórios da Requisição

  • API

sua API obtida na ZapMe

  • CHAVE_SECRETA

sua chave secreta obtida na ZapMe