PHPackages                             emmaogunwobi/whatsapp-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. emmaogunwobi/whatsapp-api

ActiveLibrary[API Development](/categories/api)

emmaogunwobi/whatsapp-api
=========================

The whatsapp-notification package allows Laravel applications to send WhatsApp messages via Meta’s WhatsApp Cloud API. This package provides an easy-to-use service for sending template messages, handling API authentication, and managing message logging.

v1.0.1(1y ago)02MITPHPPHP &gt;=8.0

Since Mar 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/haiman4real/whatsapp-api)[ Packagist](https://packagist.org/packages/emmaogunwobi/whatsapp-api)[ RSS](/packages/emmaogunwobi-whatsapp-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

WhatsApp API by Emmanuel Ogunwobi
=================================

[](#whatsapp-api-by-emmanuel-ogunwobi)

📌 Introduction
--------------

[](#-introduction)

`whatsapp-api` is a package that enables **sending WhatsApp messages** via **Meta's WhatsApp Cloud API**. It allows you to send **text messages, template messages, and media (images, videos, documents)** directly from your Laravel application.

---

📦 Features
----------

[](#-features)

✅ **Send WhatsApp text messages**
✅ **Send WhatsApp template messages**
✅ **Send media messages (images, videos, documents)**
✅ **Uses Meta's WhatsApp Cloud API**
✅ **Simple service-based architecture**
✅ **Easy configuration using `.env`**
✅ **Supports Laravel auto-discovery**

---

📥 Installation
--------------

[](#-installation)

### Install the Package via Composer

[](#install-the-package-via-composer)

```
composer require yourvendor/whatsapp-notification
```

### Publish the Configuration File

[](#publish-the-configuration-file)

```
php artisan vendor:publish --tag=config
```

### Add API Credentials to .env

[](#add-api-credentials-to-env)

```
WHATSAPP_ACCESS_TOKEN=your_facebook_whatsapp_api_access_token
WHATSAPP_BUSINESS_PHONE_ID=your_whatsapp_business_phone_id
```

Usage
-----

[](#usage)

### Use the WhatsAppService

[](#use-the-whatsappservice)

Inject the WhatsAppService into your controller:

```
use Emmaogunwobi\WhatsAppApi\Services\WhatsAppService;

class WhatsAppController extends Controller
{
    protected $whatsappService;

    public function __construct(WhatsAppService $whatsappService)
    {
        $this->whatsappService = $whatsappService;
    }

    public function sendWhatsAppMessage()
    {
        $recipient = '2348123456789'; // WhatsApp number in international format
        $message = "Hello! This is a test message from Laravel.";

        $response = $this->whatsappService->sendMessage($recipient, $message);

        return response()->json($response);
    }
}
```

### Call the API

[](#call-the-api)

Start your Laravel app:

```
php artisan serve
```

Send a request

```
http://127.0.0.1:8000/api/send-whatsapp
```

Available Methods
-----------------

[](#available-methods)

### Send a Custom Text Message

[](#send-a-custom-text-message)

```
$response = $whatsappService->sendMessage('2348123456789', 'Hello from Laravel!');
```

### 2️⃣ Send a WhatsApp Template Message

[](#2️⃣-send-a-whatsapp-template-message)

```
$response = $whatsappService->sendTemplateMessage('2348123456789', 'hello_world');
```

### 3️⃣ Send a Media Message (Image, Video, Document)

[](#3️⃣-send-a-media-message-image-video-document)

```
$response = $whatsappService->sendMediaMessage('2348123456789', 'https://example.com/image.jpg', 'image');
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance46

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

434d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2d3596d40f0524bf1f8300edce57faeda972783d65bda5524e3b758dc9f7f8f?d=identicon)[haiman4real](/maintainers/haiman4real)

---

Top Contributors

[![haiman4real](https://avatars.githubusercontent.com/u/8198431?v=4)](https://github.com/haiman4real "haiman4real (3 commits)")

### Embed Badge

![Health badge](/badges/emmaogunwobi-whatsapp-api/health.svg)

```
[![Health](https://phpackages.com/badges/emmaogunwobi-whatsapp-api/health.svg)](https://phpackages.com/packages/emmaogunwobi-whatsapp-api)
```

###  Alternatives

[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
