PHPackages                             sapamatech/whatsapp - 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. sapamatech/whatsapp

ActiveLibrary

sapamatech/whatsapp
===================

PHP Wrapper for Facebook WhatsApp Business API

01PHP

Since Jun 16Pushed 10mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

📲 Sapamatech WhatsApp API PHP Wrapper
=====================================

[](#-sapamatech-whatsapp-api-php-wrapper)

A lightweight PHP wrapper for the [WhatsApp Cloud API](https://developers.facebook.com/docs/whatsapp/cloud-api/) by **Sapamatech**. Easily send text, media, templates, interactive buttons, and stickers via WhatsApp.

---

🛠️ Installation
---------------

[](#️-installation)

Clone the repository:

```
git clone https://github.com/your-username/sapamatech-whatsapp-api.git
```

Include `WhatsappApi.php` in your PHP project, or set up autoloading via Composer (coming soon).

---

🚀 Quick Start
-------------

[](#-quick-start)

```
require 'WhatsappApi.php';

use Sapamatech\Whatsapp\WhatsappApi;

$whatsapp = new WhatsappApi('YOUR_PHONE_NUMBER_ID', 'YOUR_ACCESS_TOKEN');

// Send a simple text message
$whatsapp->sendTextMessage('+1234567890', 'Hello from Sapamatech!');
```

---

✅ Available Methods
-------------------

[](#-available-methods)

### 📤 Send Text Message

[](#-send-text-message)

```
$whatsapp->sendTextMessage('+1234567890', 'Hello there!');
```

### 🧾 Send Template Message

[](#-send-template-message)

```
$whatsapp->sendTemplateMessage(
    '+1234567890',
    'hello_world',
    'en_US',
    [
        [
            'type' => 'body',
            'parameters' => [
                ['type' => 'text', 'text' => 'John']
            ]
        ]
    ]
);
```

### 🖼 Send Image

[](#-send-image)

```
$whatsapp->sendImageMessage('+1234567890', 'https://example.com/image.jpg', 'Look at this image');
```

### 📄 Send Document

[](#-send-document)

```
$whatsapp->sendDocumentMessage('+1234567890', 'https://example.com/doc.pdf', 'MyDoc.pdf', 'Document caption');
```

### 🎞 Send Video

[](#-send-video)

```
$whatsapp->sendVideoMessage('+1234567890', 'https://example.com/video.mp4', 'Cool video');
```

### 🔊 Send Audio

[](#-send-audio)

```
$whatsapp->sendAudioMessage('+1234567890', 'https://example.com/audio.mp3');
```

### 🧩 Send Interactive Buttons

[](#-send-interactive-buttons)

```
$buttons = [
    ['id' => 'btn_yes', 'title' => 'Yes'],
    ['id' => 'btn_no', 'title' => 'No']
];

$whatsapp->sendInteractiveButtons(
    '+1234567890',
    'Question',
    'Do you agree?',
    'Click one',
    $buttons
);
```

### 💬 Send Sticker

[](#-send-sticker)

```
$whatsapp->sendStickerMessage('+1234567890', 'https://example.com/sticker.webp');
```

---

ℹ️ Requirements
---------------

[](#ℹ️-requirements)

- PHP 4.4 or higher
- WhatsApp Cloud API access
- Verified Meta Business Account
- Publicly accessible media URLs

---

📄 License
---------

[](#-license)

MIT License

---

🧑‍💻 Author
----------

[](#‍-author)

**Sapamatech**
🌐
📧 📧 +254722906835

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance40

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/185ca9f9c4cbefb676702fdf0eae8dd2bdc2adc5f4fbdaa1327c44a2e24e5c2f?d=identicon)[edwinmugendi](/maintainers/edwinmugendi)

---

Top Contributors

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

### Embed Badge

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

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

PHPackages © 2026

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