PHPackages                             bayurifkialghifari/waxum-php-client - 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. bayurifkialghifari/waxum-php-client

ActiveLibrary

bayurifkialghifari/waxum-php-client
===================================

Laravel PHP client for the Waxum WhatsApp API gateway

v1.0.3(yesterday)022↑2627.3%MITPHP ^8.2

Since Jul 22Compare

[ Source](https://github.com/bayurifkialghifari/waxum-php-client)[ Packagist](https://packagist.org/packages/bayurifkialghifari/waxum-php-client)[ Docs](https://github.com/bayurifkialghifari/waxum-php-client)[ RSS](/packages/bayurifkialghifari-waxum-php-client/feed)WikiDiscussions Synced today

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

Waxum PHP Client for Laravel
============================

[](#waxum-php-client-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cbf22451538a348a1506eaea0e01e3eeb0f68039458ee8db018c01b9e13beeec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626179757269666b69616c676869666172692f776178756d2d7068702d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bayurifkialghifari/waxum-php-client)[![Tests](https://camo.githubusercontent.com/75d86d062f2855566c806ee8544317be649a18ca70123261e6712096c12d597a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626179757269666b69616c676869666172692f776178756d2d7068702d636c69656e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/bayurifkialghifari/waxum-php-client/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/52ded80d44ea88c580668aacdc5069f3044c34ec1815d9b7c4ab8e8262b2de26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626179757269666b69616c676869666172692f776178756d2d7068702d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bayurifkialghifari/waxum-php-client)

A Laravel PHP client library for the [Waxum WhatsApp API Gateway](https://github.com/imtaqin/waxum). Provides a clean, modular interface to interact with WhatsApp through your Waxum server instance.

Features
--------

[](#features)

- 🏗️ **Modular Architecture** — Organized by functionality: `session`, `message`, `group`, `contacts`, `blast`, `calls`, `chatstate`, `media`, `newsletter`, `nats`, `scheduler`, `presence`, `privacy`, `status`, `blocking`, `operations`, `mex`, `webhook`
- 📦 **PHP DTOs** — Strongly typed Data Transfer Objects for requests and responses across all endpoints
- 🔗 **Laravel Integration** — Service provider, facade (`WaxumApi`), and config file included
- ⚙️ **Configurable** — Set `base_url` and `token` via `.env` or config file

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Laravel / `illuminate/support` &gt;= 12.0

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

[](#installation)

```
composer require bayurifkialghifari/waxum-php-client
```

Publish the config file:

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

Configuration
-------------

[](#configuration)

Add to your `.env`:

```
WAXUM_BASE_URL=http://localhost:3451
WAXUM_TOKEN=your-bearer-token
```

Published config (`config/waxum.php`):

```
return [
    'base_url' => env('WAXUM_BASE_URL', 'http://localhost:3451'),
    'token'    => env('WAXUM_TOKEN'),
];
```

Quick Start
-----------

[](#quick-start)

### Using DTO Objects (Recommended)

[](#using-dto-objects-recommended)

```
use Bayurifkialghifari\WaxumApi\Facades\WaxumApi;
use Bayurifkialghifari\WaxumApi\DTOs\Session\CreateSessionRequest;
use Bayurifkialghifari\WaxumApi\DTOs\Common\SendTextRequest;

// Create a WhatsApp session using DTO
$session = WaxumApi::session()->create(new CreateSessionRequest(
    name: 'Support Session',
));
echo $session->id;

// Send a text message using DTO
$response = WaxumApi::message()->sendText('session-id-123', new SendTextRequest(
    to: '628123456789@s.whatsapp.net',
    text: 'Hello from Waxum PHP Client! 👋',
));

echo $response->messageId; // Typed property from SendResponse DTO
```

### Using Associative Arrays

[](#using-associative-arrays)

```
// Arrays are also supported for quick calls
$response = WaxumApi::message()->sendText('session-id-123', [
    'to' => '628123456789@s.whatsapp.net',
    'text' => 'Hello from array request!',
]);
```

---

API Reference &amp; DTO Usage
-----------------------------

[](#api-reference--dto-usage)

### 📱 Session (`WaxumApi::session()`)

[](#-session-waxumapisession)

```
use Bayurifkialghifari\WaxumApi\DTOs\Session\CreateSessionRequest;
use Bayurifkialghifari\WaxumApi\DTOs\Common\ConnectRequest;

// Create session
$session = WaxumApi::session()->create(new CreateSessionRequest(name: 'My Session'));
echo $session->id;

// Connect session
$result = WaxumApi::session()->connect('session-123', new ConnectRequest(subscribe: ['Message']));
echo $result->message;

// Get status
$status = WaxumApi::session()->getStatus('session-123');
echo $status->isLoggedIn; // bool
```

### 💬 Messages (`WaxumApi::message()`)

[](#-messages-waxumapimessage)

```
use Bayurifkialghifari\WaxumApi\DTOs\Common\SendTextRequest;
use Bayurifkialghifari\WaxumApi\DTOs\Common\SendImageRequest;

// Send text
$response = WaxumApi::message()->sendText('session-123', new SendTextRequest(
    to: '628123456789@s.whatsapp.net',
    text: 'Hello World!',
));
echo $response->messageId;

// Send image
$imageResponse = WaxumApi::message()->sendImage('session-123', new SendImageRequest(
    to: '628123456789@s.whatsapp.net',
    image: 'https://example.com/image.jpg',
    caption: 'Awesome picture',
));
```

### 👥 Groups (`WaxumApi::group()`)

[](#-groups-waxumapigroup)

```
use Bayurifkialghifari\WaxumApi\DTOs\Group\CreateGroupRequest;

// Create group
$group = WaxumApi::group()->create('session-123', new CreateGroupRequest(
    subject: 'Development Team',
    participants: ['628123456789@s.whatsapp.net'],
));
```

### 🚀 Blast Jobs (`WaxumApi::blast()`)

[](#-blast-jobs-waxumapiblast)

```
use Bayurifkialghifari\WaxumApi\DTOs\Blast\CreateBlastRequest;

// Create blast job
$blast = WaxumApi::blast()->create('session-123', new CreateBlastRequest(
    name: 'Promo Blast',
    recipients: ['628123456789@s.whatsapp.net'],
    message: 'Check out our latest offer!',
));
```

### 🌐 Webhooks (`WaxumApi::webhook()`)

[](#-webhooks-waxumapiwebhook)

```
use Bayurifkialghifari\WaxumApi\DTOs\Webhook\RegisterWebhookRequest;

// Register webhook
$webhook = WaxumApi::webhook()->register('session-123', new RegisterWebhookRequest(
    url: 'https://example.com/webhook',
    events: ['message', 'presence'],
));
```

---

Testing
-------

[](#testing)

```
composer test
```

Code Formatting
---------------

[](#code-formatting)

```
composer format
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance100

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

4

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4166e5118b410e3315fd869981ef89f01c084951834bce5cd37c6ac59de78080?d=identicon)[bayurifki](/maintainers/bayurifki)

---

Tags

laravelapi clientwhatsappbayurifkialghifariwaxum

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/bayurifkialghifari-waxum-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/bayurifkialghifari-waxum-php-client/health.svg)](https://phpackages.com/packages/bayurifkialghifari-waxum-php-client)
```

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M177](/packages/spatie-laravel-health)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.3k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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