bajjour/ensany-whatsapp

A Laravel package for Send Whatsapp messages using ensany backend

1.0.0 2025-06-25 12:34 UTC

This package is auto-updated.

Last update: 2025-06-25 12:43:58 UTC


README

This package provides a simple and easy-to-use interface to send whatsapp messages using Ensany Dashboard.

Installation

You can install the package via Composer:

composer require bajjour/ensany-whatsapp

Configuration

After installing the package, publish the configuration file:

php artisan vendor:publish --provider="EnsanyWhatsapp\EnsanyWhatsappServiceProvider" --tag="ensany-whatsapp-config"

Update your .env file with your Stripe API credentials:

ENSANY_WHATSAPP_API_KEY="your-app-key"
ENSANY_WHATSAPP_DEVICE_ID="device-id"

Usage

Initialize the Service

You can initialize the Stripe service in your controller:

use EnsanyWhatsapp\Services\WhatsappService;


public function __construct(WhatsappService $w_service)
{
    $this->w_service = $w_service;
}

Send Text Message

$mobile = '970xxxxxxxxx';
$msg = 'Welcome From Ensany';
$res = $this->m_service->send_text($mobile, $msg);

Response

detailed array returned

{
  "status": true,
  "message": "lynx.successfully",
  "result": {
    "success": true,
    "message_id": "sent-message-id",
    "scheduled_at": "send-date"
  },
  "meta": null
}

License

MIT