econsulte/whatsapp-business-php-sdk

There is no license information available for the latest version (v1.1.0) of this package.

v1.1.0 2023-09-23 11:48 UTC

This package is auto-updated.

Last update: 2024-04-23 13:09:36 UTC


README

composer require econsulte/whatsapp-api-sdk

INÍCIO

Creat a new object BoletoSDK with token

use Econsulte\whatsappApiSDK\whatsappSDK;
$api = new WhatsAppSDK('################################', 'phone_number_id');

ENVIO DE MENSAGEM

message + whatsapp_number

$app->sendTextMessage('hello world', "55###########")

ENVIO DE MENSAGEM TEMPLATE

template_name + whatsapp_number + parameters + lang

$app->sendTemplateMessage('template_name', "55###########", [[
        "type" => "body",
        "parameters" => [
            [
                'type' => 'text',
                'text' => $var1,
            ],
            [
                'type' => 'text',
                'text' => $var2
            ]
        ]
    ]])