PHP code example of emizoripx / whatsapp-cloudapi
1. Go to this page and download the library: Download emizoripx/whatsapp-cloudapi 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/ */
emizoripx / whatsapp-cloudapi example snippets
use EmizorIpx\WhatsappCloudapi\Facades\WhatsappCloudapiMessage;
use EmizorIpx\WhatsappCloudapi\Messages\Template\Component;
use EmizorIpx\WhatsappCloudapi\Services\Whatsapp\Settings\WhatsappCloudApiSettings;
...
$cloud_settings = new WhatsappCloudApiSettings( $from_phone_number_id, $access_token );
$components = new Component($header_components, $body_components, $buttons_components);
WhatsappCloudapiMessage::sendMessageWithTemplate($cloud_settings, $phone_number, $template_name, $components);