1. Go to this page and download the library: Download ativabot/php-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/ */
ativabot / php-sdk example snippets
use AtivaBot\Client;
$client = Client::create(
'seu-api-id-uuid',
'seu-jwt-token'
);
// Enviar mensagem de texto
$response = $client->messages()->sendText(
'5511999999999',
'Olá! Mensagem enviada via SDK AtivaBot em PHP puro.'
);
// Enviar arquivo de mídia (imagem/PDF/áudio)
$mediaResponse = $client->messages()->sendMedia(
'5511999999999',
'/caminho/para/documento.pdf',
'Legenda da mídia',
'minha_chave_externa_123'
);