PHPackages                             dypras666/wabameta - 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. dypras666/wabameta

ActiveLibrary[API Development](/categories/api)

dypras666/wabameta
==================

WhatsApp Business API (WABA) Meta Integration Module

v0.0.1(2mo ago)03MITPHPPHP &gt;=8.1

Since Feb 24Pushed 2mo agoCompare

[ Source](https://github.com/dypras666/waba)[ Packagist](https://packagist.org/packages/dypras666/wabameta)[ RSS](/packages/dypras666-wabameta/feed)WikiDiscussions main Synced 1mo ago

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

WABA Meta Integration
=====================

[](#waba-meta-integration)

A simple PHP package to integrate with Meta's WhatsApp Business API (WABA).

Installation
------------

[](#installation)

```
composer require dypras666/waba
```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

```
use Dypras666\WabaMeta\Config;
use Dypras666\WabaMeta\Waba;

$config = new Config(
    phoneNumberId: 'YOUR_PHONE_NUMBER_ID',
    wabaId: 'YOUR_WABA_ID',
    accessToken: 'YOUR_ACCESS_TOKEN',
    verifyToken: 'YOUR_VERIFY_TOKEN'
);

$waba = new Waba($config);
```

### Sending Messages

[](#sending-messages)

#### Send Text Message

[](#send-text-message)

```
$waba->sendText('628123456789', 'Hello from WABA Meta!');
```

### Group Messaging (Kirim ke Grup)

[](#group-messaging-kirim-ke-grup)

Anda dapat mengirim pesan ke WhatsApp Group menggunakan `group_id`.

```
// Switch ke mode grup
$waba->setRecipientType('group');

// Kirim pesan teks ke grup
$waba->sendText('GROUP_ID_ANDA', 'Halo semua di grup!');

// Setelah selesai, kembalikan ke individual jika perlu
$waba->setRecipientType('individual');
```

### Create Group (Experimental)

[](#create-group-experimental)

Membuat grup baru melalui API. Membutuhkan `wabaId` di Config.

```
$response = $waba->createGroup('Nama Group Baru');
$groupId = $response['id'];
```

### Sending Templates with Media Headers &amp; Variables

[](#sending-templates-with-media-headers--variables)

Gunakan `ComponentBuilder` untuk menyisipkan PDF/Gambar sebagai header dan identitas cabang di body.

```
use Dypras666\WabaMeta\ComponentBuilder;

$builder = new ComponentBuilder();
$components = $builder
    ->addDocumentHeader('https://example.com/invoice.pdf', 'Invoice.pdf')
    ->addBody(['Cabang Jakarta', 'INV-001']) // {{1}} dan {{2}}
    ->build();

$waba->sendTemplate(
    to: '628123456789',
    templateName: 'invoice_template',
    components: $components
);
```

### Sending Templates with Components (Buttons, Footer, etc.)

[](#sending-templates-with-components-buttons-footer-etc)

For complex templates, you can use the `ComponentBuilder` utility.

```
use Dypras666\WabaMeta\ComponentBuilder;

$builder = new ComponentBuilder();
$components = $builder
    ->addTextHeader('Halo Pelanggan!')
    ->addBody(['Nama User', 'Order #123'])
    ->addFooter([['type' => 'text', 'text' => 'Terima kasih telah berbelanja!']])
    ->addUrlButton(0, 'tracking/123') // Menambahkan suffix ke URL button di index 0
    ->addQuickReplyButton(1, 'YES_CONFIRM') // Payload untuk button di index 1
    ->build();

$waba->sendTemplate(
    to: '628123456789',
    templateName: 'order_update',
    components: $components
);
```

### Interactive Messages (Tanpa Template)

[](#interactive-messages-tanpa-template)

Anda dapat mengirim pesan dengan tombol tanpa perlu mendaftarkan template di Meta.

#### Send CTA URL (Button Link)

[](#send-cta-url-button-link)

```
$waba->sendCtaUrl(
    to: '6281373350813',
    body: 'Klik tombol di bawah untuk melihat detail pesanan Anda.',
    buttonText: 'Lihat Pesanan',
    url: 'https://example.com/order/123',
    headerText: 'Info Pesanan',
    footerText: 'Berlaku hingga 24 jam'
);
```

#### Send Image + Footer + Link (Tanpa Template)

[](#send-image--footer--link-tanpa-template)

```
$waba->sendImageCtaUrl(
    to: '6281373350813',
    imageUrl: 'https://example.com/promo.jpg',
    body: 'Promo spesial hari ini! Cek sekarang sebelum kehabisan.',
    buttonText: 'Klaim Promo',
    url: 'https://example.com/promo',
    footerText: 'Syarat & Ketentuan berlaku'
);
```

#### Send PDF + Footer + Link (Tanpa Template)

[](#send-pdf--footer--link-tanpa-template)

```
$waba->sendDocumentCtaUrl(
    to: '6281373350813',
    documentUrl: 'https://example.com/invoice.pdf',
    filename: 'Invoice_User.pdf',
    body: 'Ini adalah invoice Anda. Klik tombol untuk melihat di dashboard.',
    buttonText: 'Dashboard',
    url: 'https://example.com/dashboard',
    footerText: 'Dokumen Resmi © 2026'
);
```

#### Send Reply Buttons (Max 3 buttons)

[](#send-reply-buttons-max-3-buttons)

```
$waba->sendReplyButtons(
    to: '6281373350813',
    body: 'Apakah Anda ingin mengkonfirmasi pesanan?',
    buttons: [
        ['id' => 'conf_yes', 'title' => 'Ya, Benar'],
        ['id' => 'conf_no', 'title' => 'Tidak']
    ],
    headerText: 'Konfirmasi',
    footerText: 'Silakan pilih salah satu'
);
```

#### Send List Message (Selection)

[](#send-list-message-selection)

```
$sections = [
    [
        'title' => 'Pilihan Cabang',
        'rows' => [
            ['id' => 'br_1', 'title' => 'Cabang A', 'description' => 'Alamat cabang A'],
            ['id' => 'br_2', 'title' => 'Cabang B', 'description' => 'Alamat cabang B']
        ]
    ]
];

$waba->sendListMessage(
    to: '6281373350813',
    headerText: 'Lokasi Kami',
    body: 'Pilih cabang terdekat Anda:',
    buttonText: 'Lihat Daftar',
    sections: $sections,
    footerText: 'Info lebih lanjut hubungi CS'
);
```

### Sending Media

[](#sending-media)

#### Send Image

[](#send-image)

```
$waba->sendImage('628123456789', 'https://example.com/image.jpg', 'Ini caption gambar');
```

#### Send Document

[](#send-document)

```
$waba->sendDocument('628123456789', 'https://example.com/file.pdf', 'invoice.pdf', 'Ini invoice Anda');
```

#### Verification (Route `/webhook` GET)

[](#verification-route-webhook-get)

```
$challenge = $waba->verifyWebhook(
    $_GET['hub_mode'] ?? '',
    $_GET['hub_verify_token'] ?? '',
    $_GET['hub_challenge'] ?? ''
);

if ($challenge) {
    echo $challenge;
    exit;
}

http_response_code(403);
```

#### Handling Payloads (Route `/webhook` POST)

[](#handling-payloads-route-webhook-post)

```
$payload = json_decode(file_get_contents('php://input'), true);
$data = $waba->handleWebhook($payload);

if (isset($data['messages'])) {
    foreach ($data['messages'] as $message) {
        // Process new message
    }
}
```

Authors
-------

[](#authors)

- Kurniawan ()

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance84

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

84d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/dypras666-wabameta/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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