PHPackages                             wilsonglasser/laravel-chatapi-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. [API Development](/categories/api)
4. /
5. wilsonglasser/laravel-chatapi-whatsapp

ActiveLibrary[API Development](/categories/api)

wilsonglasser/laravel-chatapi-whatsapp
======================================

Send WhatsApp messages with Chat API

1.0.0(7y ago)498.0k18[3 issues](https://github.com/wilsonglasser/laravel-chatapi-whatsapp/issues)MITPHPPHP &gt;=5.6.4CI failing

Since Nov 5Pushed 4y ago5 watchersCompare

[ Source](https://github.com/wilsonglasser/laravel-chatapi-whatsapp)[ Packagist](https://packagist.org/packages/wilsonglasser/laravel-chatapi-whatsapp)[ Docs](https://github.com/wilsonglasser/laravel-chatapi-whatsapp)[ RSS](/packages/wilsonglasser-laravel-chatapi-whatsapp/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Laravel client and channel for WhatsApp API (by Chat API)
=========================================================

[](#laravel-client-and-channel-for--whatsapp-api-by-chat-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f4abdb46461939f14281fe8e1ef69af3aea1eda44fa7f279be446ed897d395a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77696c736f6e676c61737365722f6c61726176656c2d636861746170692d77686174736170702e7376673f7374796c653d666c61742d73717561726526723d31)](https://packagist.org/packages/wilsonglasser/laravel-chatapi-whatsapp)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/5faad52ba9b9f0176c9e597dbbaac1ca4a69bd0c2cad4f68c658a0f0265d8923/68747470733a2f2f706f7365722e707567782e6f72672f77696c736f6e676c61737365722f6c61726176656c2d636861746170692d77686174736170702f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wilsonglasser/laravel-chatapi-whatsapp)

This package makes it easy to send WhatsApp messages using [Chat API](https://chat-api.com/) with Laravel 5.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)

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

[](#installation)

You can install the package via composer:

```
composer require wilsonglasser/laravel-chatapi-whatsapp
```

You must install the service provider:

```
// config/app.php
'providers' => [
    ...
    NotificationChannels\ChatAPI\ChatAPIServiceProvider::class,
],
```

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

[](#configuration)

Configure your credentials:

```
// config/services.php
...
'chatapi' => [
    'token'          => env('CHATAPI_TOKEN', ''),
    'api_url'       => env('CHATAPI_URL', ''),
],
...
```

Usage
-----

[](#usage)

You can now use the channel in your `via()` method inside the Notification class.

```
use NotificationChannels\ChatAPI\ChatAPIChannel;
use NotificationChannels\ChatAPI\ChatAPIMessage;
use Illuminate\Notifications\Notification;

class InvoicePaid extends Notification
{
    public function via($notifiable)
    {
        return [ChatAPIChannel::class];
    }

    public function toChatAPI($notifiable)
    {
        return ChatAPIMessage::create()
            ->to($notifiable->phone) // your user phone
            ->file('/path/to/file','My Photo.jpg')
            ->content('Your invoice has been paid');
    }
}
```

### Routing a message

[](#routing-a-message)

You can either send the notification by providing with the chat id of the recipient to the to($phone) method like shown in the above example or add a routeNotificationForChatAPI() method in your notifiable model:

```
...
/**
 * Route notifications for the Telegram channel.
 *
 * @return int
 */
public function routeNotificationForChatAPI()
{
    return $this->phone;
}
...
```

### Available Message methods

[](#available-message-methods)

- `to($phone)`: (integer) Recipient's phone.
- `content('message')`: (string) Message.
- `file('/path/to/file','My Photo.jpg')`: (string) File real path, you can also send the file contents and pass two additional params for file name and file mime type (required)
- `file('/path/to/file','My Photo.jpg','image/jpg')`

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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

2746d ago

### Community

Maintainers

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

---

Top Contributors

[![wilsonglasser](https://avatars.githubusercontent.com/u/342362?v=4)](https://github.com/wilsonglasser "wilsonglasser (8 commits)")[![erickfirmo](https://avatars.githubusercontent.com/u/34639603?v=4)](https://github.com/erickfirmo "erickfirmo (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wilsonglasser-laravel-chatapi-whatsapp/health.svg)

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

###  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)
