PHPackages                             digiworld/digichat - 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. digiworld/digichat

ActiveLibrary[API Development](/categories/api)

digiworld/digichat
==================

Laravel package for DigiChat WhatsApp API integration

v1.2.7(1mo ago)123MITPHPPHP ^8.2

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/Inferno-Team/digichat)[ Packagist](https://packagist.org/packages/digiworld/digichat)[ Docs](https://chat.digiworld-dev.com/)[ RSS](/packages/digiworld-digichat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (15)Used By (0)

DigiChat WhatsApp API Package for Laravel
=========================================

[](#digichat-whatsapp-api-package-for-laravel)

[![DigiChat Logo](https://camo.githubusercontent.com/92de7a669fa545bd9b3ed0d7a8efdba90684bf95bd911c7c3935cd1f56eb8049/68747470733a2f2f636861742e64696769776f726c642d6465762e636f6d2f6173736574732f696d672f617661746172732f6c6f676f2e737667)](https://camo.githubusercontent.com/92de7a669fa545bd9b3ed0d7a8efdba90684bf95bd911c7c3935cd1f56eb8049/68747470733a2f2f636861742e64696769776f726c642d6465762e636f6d2f6173736574732f696d672f617661746172732f6c6f676f2e737667) DigiChat
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-digichat)

DigiChat is a lightweight Laravel package that lets your app send WhatsApp messages and manage the session through DigiChat.

---

✅ Requirements
--------------

[](#-requirements)

- PHP **8.2+**
- Laravel **8 / 9 / 10 / 11 / 12 / 13**

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require digiworld/digichat
```

Then publish the config:

```
php artisan digichat:install
```

---

⚙️ Configuration
----------------

[](#️-configuration)

Add the following to your `.env`:

```
DIGICHAT_API_TOKEN=your_token_here
DIGICHAT_API_SECRET=your_secret_here
```

You can find these credentials in your DigiChat dashboard:
****

If you don’t have access, please contact DigiWorld support.

Full docs are available here:
****

---

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

[](#-quick-start)

Using the **Facade**:

```
use Digiworld\DigiChat\Facades\DigiChat;

$response = DigiChat::sendMessage('963XXXXXXXX', 'Hello from DigiChat');
```

Using the **Manager** directly:

```
use Digiworld\DigiChat\DigiChatManager;

Route::get('/digichat/test', function (DigiChatManager $digichat) {
    return $digichat->sendMessage('963XXXXXXXX', 'Hello from DigiChat');
});
```

---

🔀 Multi Session
---------------

[](#-multi-session)

The package config acts as the **default session**.

If you need multiple DigiChat sessions in the same Laravel project, use either the facade `session()` helper or create a manager with credentials directly.

Using the **Facade session helper**:

```
use Digiworld\DigiChat\Facades\DigiChat;

$sessionA = DigiChat::session('token-a', 'secret-a');
$sessionB = DigiChat::session('token-b', 'secret-b');

$sessionA->sendText('123456789@g.us', 'Message from session A');
$sessionB->sendText('987654321@g.us', 'Message from session B');
```

Using the **Manager constructor**:

```
use Digiworld\DigiChat\DigiChatManager;

$client = new DigiChatManager('token-a', 'secret-a');

$client->sendText('123456789@g.us', 'Message from custom client');
```

Using the **Laravel container** with runtime credentials:

```
$client = app(\Digiworld\DigiChat\DigiChatManager::class, [
    'token' => 'token-a',
    'secret' => 'secret-a',
]);
```

If `token` or `secret` is `null`, the package falls back to the values from `config/digichat.php`.

---

💬 Chat ID Formats
-----------------

[](#-chat-id-formats)

- Contact: `963XXXXXXXX` or `963XXXXXXXX@c.us`
- Group: `123456789@g.us`
- Newsletter / Channel: `123456789@newsletter`

Notes:

- Contact numbers starting with `+` are normalized automatically.
- `sendMessage()` is still available for plain contact text messages.
- `sendText()` supports contacts, groups, and newsletters.
- `sendMedia()` supports contacts, groups, and newsletters.
- `sendFile()` supports contacts and groups only.
- Newsletter / channel file sends are not supported.

---

📚 Available Methods
-------------------

[](#-available-methods)

### 1) `session(?string $token = null, ?string $secret = null): DigiChatManager`

[](#1-sessionstring-token--null-string-secret--null-digichatmanager)

Create an isolated client for another DigiChat session.

```
$otherSession = DigiChat::session('token-a', 'secret-a');

$otherSession->sendText('123456789@g.us', 'Hello from another session');
```

### 2) `sendMessage(string $phoneNumber, string $message): array`

[](#2-sendmessagestring-phonenumber-string-message-array)

Send a plain text message to a contact.

```
DigiChat::sendMessage('963XXXXXXXX', 'Hello there');
```

### 3) `send(array $payload): array`

[](#3-sendarray-payload-array)

Send a prepared payload.

```
DigiChat::send([
    'chatId' => '963XXXXXXXX',
    'type' => 'text',
    'text' => 'Hello from send()',
]);
```

### 4) `sendText(string $chatId, string $text, array $options = []): array`

[](#4-sendtextstring-chatid-string-text-array-options---array)

Send text to a contact, group, or newsletter.

```
DigiChat::sendText('963XXXXXXXX', 'Hello contact');
DigiChat::sendText('123456789@g.us', 'Hello group');
DigiChat::sendText('123456789@newsletter', 'Latest update');
```

### 5) `sendMedia(string $chatId, array|string $media, ?string $caption = null, array $options = []): array`

[](#5-sendmediastring-chatid-arraystring-media-string-caption--null-array-options---array)

Send media with an optional caption.

```
DigiChat::sendMedia('123456789@g.us', [
    'mimetype' => 'image/png',
    'filename' => 'image.png',
    'base64' => base64_encode(file_get_contents(storage_path('app/image.png'))),
], 'Image caption');

DigiChat::sendMedia('123456789@newsletter', [
    'mimetype' => 'image/jpeg',
    'filename' => 'update.jpg',
    'base64' => base64_encode(file_get_contents(storage_path('app/update.jpg'))),
], 'Channel update');
```

### 6) `sendFile(string $chatId, array|string $media, ?string $caption = null, array $options = []): array`

[](#6-sendfilestring-chatid-arraystring-media-string-caption--null-array-options---array)

Send a file to a contact or group.

```
DigiChat::sendFile('123456789@g.us', [
    'mimetype' => 'application/pdf',
    'filename' => 'report.pdf',
    'base64' => base64_encode(file_get_contents(storage_path('app/report.pdf'))),
], 'Monthly report');
```

### 7) `getQr(): array`

[](#7-getqr-array)

Get the current QR payload for session pairing.

```
$qr = DigiChat::getQr();
```

### 8) `getStatus(): array`

[](#8-getstatus-array)

Get the current session status.

```
$status = DigiChat::getStatus();
```

### 9) `start(): array`

[](#9-start-array)

Start the session.

```
$start = DigiChat::start();
```

### 10) `refresh(bool $withDeletion = false): array`

[](#10-refreshbool-withdeletion--false-array)

Refresh the session.

```
$refresh = DigiChat::refresh();
$refreshAndDelete = DigiChat::refresh(withDeletion: true);
```

### 11) `logout(bool $withDeletion = false): array`

[](#11-logoutbool-withdeletion--false-array)

Logout the current session.

```
$logout = DigiChat::logout();
$logoutAndDelete = DigiChat::logout(withDeletion: true);
```

### 12) `ping(): array`

[](#12-ping-array)

Check API availability.

```
$ping = DigiChat::ping();
```

### 13) `getInviteInfo(string $inviteCode): array`

[](#13-getinviteinfostring-invitecode-array)

Get WhatsApp invite information.

```
$invite = DigiChat::getInviteInfo('YOUR_INVITE_CODE');
```

### 14) `getChannelInfo(array|string $invite): array`

[](#14-getchannelinfoarraystring-invite-array)

Get newsletter / channel information from an invite code or invite link.

```
$channelByCode = DigiChat::getChannelInfo('AbCdEfGhIjK');

$channelByLink = DigiChat::getChannelInfo('https://whatsapp.com/channel/AbCdEfGhIjK');
```

---

🛠 Example Route
---------------

[](#-example-route)

```
use Illuminate\Support\Facades\Route;
use Digiworld\DigiChat\Facades\DigiChat;

Route::get('/digichat/demo', function () {
    return response()->json([
        'send' => DigiChat::sendMessage('963XXXXXXXX', 'Hello from DigiChat'),
        'status' => DigiChat::getStatus(),
    ]);
});
```

---

📝 Notes
-------

[](#-notes)

- All methods return the API response as an array.
- Config credentials act as the default session.
- Use `session()` or `new DigiChatManager($token, $secret)` for multi-session usage.
- Existing `sendMessage()` integrations remain supported.
- New projects can use `sendText()`, `sendMedia()`, `sendFile()`, or `send()`.
- `getChannelInfo()` can resolve channel details from either a code or a full WhatsApp channel invite link.

---

🛑 Disclaimer
------------

[](#-disclaimer)

> **Important Notice:** DigiChat uses unofficial access to WhatsApp, which may violate WhatsApp’s Terms of Service.

By using this package, you acknowledge that:

- Your phone number may be banned by WhatsApp for using unofficial APIs.
- DigiWorld is not responsible for any bans, suspensions, or loss of access to your WhatsApp account.
- Use this tool at your own risk and only for permitted purposes.

---

💬 Support
---------

[](#-support)

- Dashboard: ****
- Docs: ****
- Email: ****

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity56

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

Recently: every ~0 days

Total

14

Last Release

50d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25ea487ce7a53094f91f4c000132250dd2d8356e57fd1f567f0729db6fa7b782?d=identicon)[Inferno-Team](/maintainers/Inferno-Team)

---

Tags

apilaravelwhatsappdigichat

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digiworld-digichat/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[crenspire/laravel-whatsapp

Laravel WhatsApp Business API package

133.0k](/packages/crenspire-laravel-whatsapp)

PHPackages © 2026

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