PHP code example of euventura / uazapi-sdk

1. Go to this page and download the library: Download euventura/uazapi-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

euventura / uazapi-sdk example snippets


$uazapi = new \euventura\UazapiSdk\Uazapi($server, $token);
// Conectar Instancia
$response = $uazapi->instance()->connect($phone)



$uazapi = new \euventura\UazapiSdk\Uazapi($server, $token);
// Texto simples
$response = $uazapi->message()->sendText($number, $text);
// Imagem com legenda
$uazapi->message()->('5522999999999', 'https://exemplo.com/foto.jpg', 'Veja isto!');
// Documento
$uazapi->message()->sendDocument('5512999999999', 'https://exemplo.com/doc.pdf', 'Documento.pdf');
// Localização
$uazapi->message()->sendLocation('5511999999999', -23.5505199, -46.6333094, 'Av. Paulista');