PHPackages                             blissjaspis/laravel-whatsapp-cloud-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. blissjaspis/laravel-whatsapp-cloud-api

ActiveLibrary

blissjaspis/laravel-whatsapp-cloud-api
======================================

Laravel package for interacting to whatsapp cloud api

v1.0.0(10mo ago)083↓100%MITPHPPHP ^8.1

Since May 8Pushed 10mo ago1 watchersCompare

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

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

Laravel Whatsapp Cloud API
==========================

[](#laravel-whatsapp-cloud-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1a94219004529e45b956072376cccdd859ca7a28f7dd9a0204bed5380b2bcdf5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c6973736a61737069732f6c61726176656c2d77686174736170702d636c6f75642d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blissjaspis/laravel-whatsapp-cloud-api)[![Total Downloads](https://camo.githubusercontent.com/8693b3e06f91282345ba9d9aa678fc55b3f2b3009a9ec3916565c243d9956d20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c6973736a61737069732f6c61726176656c2d77686174736170702d636c6f75642d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blissjaspis/laravel-whatsapp-cloud-api)

Laravel package to interact with the WhatsApp Cloud API.

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

[](#requirements)

- PHP 8.1 or higher
- Laravel 10, 11, or 12

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

[](#installation)

You can install the package via composer:

```
composer require blissjaspis/laravel-whatsapp-cloud-api
```

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

[](#configuration)

First, publish the configuration file:

```
php artisan vendor:publish --provider="BlissJaspis\\WhatsappCloudApi\\WhatsappServiceProvider" --tag="config"
```

This will create a `config/whatsapp-cloud-api.php` file.

Next, you need to add the following environment variables to your `.env` file:

```
WHATSAPP_VERSION_SDK=v19.0
WHATSAPP_PHONE_NUMBER_ID=
WHATSAPP_ACCESS_TOKEN=
WHATSAPP_COUNTRY_CODE=+62
```

- `WHATSAPP_VERSION_SDK`: The WhatsApp Cloud API version you want to use.
- `WHATSAPP_PHONE_NUMBER_ID`: Your WhatsApp Business Phone Number ID.
- `WHATSAPP_ACCESS_TOKEN`: Your System User Access Token.
- `WHATSAPP_COUNTRY_CODE`: Your country code.

Usage
-----

[](#usage)

### Sending a Text Message

[](#sending-a-text-message)

You can send a text message using the `Whatsapp` facade.

```
use BlissJaspis\WhatsappCloudApi\Facades\Whatsapp;
use BlissJaspis\WhatsappCloudApi\Support\Text;

$response = Whatsapp::message()
    ->to('081234567890') // or ->to('6281234567890', false)
    ->body(Text::message('Hello from Laravel!')->build())
    ->send();

if ($response->successful()) {
    // Message sent successfully
}
```

The `to()` method automatically adds the country code from the configuration. If you want to use a phone number with the country code already included, you can pass `false` as the second argument.

### Sending other types of messages

[](#sending-other-types-of-messages)

This package supports sending various types of messages. Here are some examples:

#### Image

[](#image)

```
use BlissJaspis\WhatsappCloudApi\Facades\Whatsapp;
use BlissJaspis\WhatsappCloudApi\Support\Image;

Whatsapp::message()
    ->to('081234567890')
    ->body(Image::create('https://example.com/image.jpg')->build())
    ->send();

// or with caption
Whatsapp::message()
    ->to('081234567890')
    ->body(Image::create('your-media-id')->isNotUrl()->caption('your caption')->build())
    ->send();
```

#### Document

[](#document)

```
use BlissJaspis\WhatsappCloudApi\Facades\Whatsapp;
use BlissJaspis\WhatsappCloudApi\Support\Document;

Whatsapp::message()
    ->to('081234567890')
    ->body(Document::create('https://example.com/document.pdf')->filename('your-file-name.pdf')->caption('your caption')->build())
    ->send();
```

#### Audio

[](#audio)

```
use BlissJaspis\WhatsappCloudApi\Facades\Whatsapp;
use BlissJaspis\WhatsappCloudApi\Support\Audio;

Whatsapp::message()
    ->to('081234567890')
    ->body(Audio::create('your-media-id')->build())
    ->send();
```

#### Video

[](#video)

```
use BlissJaspis\WhatsappCloudApi\Facades\Whatsapp;
use BlissJaspis\WhatsappCloudApi\Support\Video;

Whatsapp::message()
    ->to('081234567890')
    ->body(Video::create('your-media-id')->build())
    ->send();
```

#### Sticker

[](#sticker)

```
use BlissJaspis\WhatsappCloudApi\Facades\Whatsapp;
use BlissJaspis\WhatsappCloudApi\Support\Sticker;

Whatsapp::message()
    ->to('081234567890')
    ->body(Sticker::create('your-media-id')->build())
    ->send();
```

### Mark a message as read

[](#mark-a-message-as-read)

You can mark a message as read using the `readMessage` method.

```
use BlissJaspis\WhatsappCloudApi\Facades\Whatsapp;

Whatsapp::readMessage('message-id');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Bliss Jaspis](https://github.com/blissjaspis)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance54

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~427 days

Total

2

Last Release

306d ago

PHP version history (2 changes)v1.0.0-beta1PHP ^8.2

v1.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c5c90080275353d1e65fc2655c85684598235849d2d4f98bef82f597cec5c6e?d=identicon)[jaspis](/maintainers/jaspis)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/blissjaspis-laravel-whatsapp-cloud-api/health.svg)

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

###  Alternatives

[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[bayareawebpro/laravel-multistep-forms

Responsable MultiStep Form Builder for Laravel.

967.9k](/packages/bayareawebpro-laravel-multistep-forms)

PHPackages © 2026

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