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

ActiveLibrary[API Development](/categories/api)

ges/laravel-green-api
=====================

Core Green API integration for Laravel.

0.1.7(3mo ago)13461MITPHPPHP ^8.3

Since Mar 14Pushed 3mo agoCompare

[ Source](https://github.com/TechGES/Laravel-green-api)[ Packagist](https://packagist.org/packages/ges/laravel-green-api)[ RSS](/packages/ges-laravel-green-api/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (4)Versions (9)Used By (1)

Laravel Green API
=================

[](#laravel-green-api)

Laravel package for Green API inbound webhooks, outbound messaging, and a persisted WhatsApp-like inbox model.

Install
-------

[](#install)

```
composer require ges/laravel-green-api
php artisan green-api:install
php artisan migrate
```

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

[](#configuration)

Publish the config file and set the Green API credentials:

```
GREEN_API_URL=
GREEN_API_MEDIA_URL=
GREEN_API_INSTANCE_ID=
GREEN_API_TOKEN=
GREEN_API_TEST_CHAT_ID=
GREEN_API_WEBHOOK_URL=
GREEN_API_WEBHOOK_AUTHORIZATION_HEADER=
```

The package uses `App\Models\User` as the default contact model and adds a dynamic `greenApiConversation` relation automatically at boot.

Commands
--------

[](#commands)

```
php artisan green-api:check-connection
php artisan green-api:sync-webhook
```

Usage
-----

[](#usage)

```
use Ges\LaravelGreenApi\Services\GreenApiInboxService;

$inbox = app(GreenApiInboxService::class);
$message = $inbox->sendTextMessage($user, 'Hello');
$conversation = $user->greenApiConversation;
```

Inbound webhooks are exposed at `POST /green-api/webhook`.

Notifications
-------------

[](#notifications)

The package also exposes a Laravel notification channel via `GreenApiChannel`.

```
use Ges\LaravelGreenApi\Notifications\GreenApiChannel;
use Ges\LaravelGreenApi\Notifications\GreenApiMessage;
use Illuminate\Notifications\Notification;

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

    public function toGreenApi(object $notifiable): GreenApiMessage
    {
        return GreenApiMessage::make('Invoice paid.');
    }
}
```

You can also use the driver alias if you prefer:

```
public function via(object $notifiable): array
{
    return ['green_api'];
}
```

For file delivery:

```
public function toGreenApi(object $notifiable): GreenApiMessage
{
    return GreenApiMessage::make()
        ->file(storage_path('app/invoice.pdf'), 'Invoice attached', 'invoice.pdf');
}
```

When the notifiable is the configured contact model, notifications are persisted into the package inbox. For anonymous or non-model notifiables, route the destination with `green_api`:

```
use Illuminate\Support\Facades\Notification;

Notification::route('green_api', '+33 6 12 34 56 78')
    ->notify(new InvoicePaid);
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance81

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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

Total

8

Last Release

102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5db9dc20af1fe51cbb0234b0bdd1f1f16f3275e78d3f7205d009fb0d694c56b4?d=identicon)[Wadie.elarrim](/maintainers/Wadie.elarrim)

---

Top Contributors

[![wadie-elarrim](https://avatars.githubusercontent.com/u/186934705?v=4)](https://github.com/wadie-elarrim "wadie-elarrim (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ges-laravel-green-api/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M920](/packages/statamic-cms)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k9.9M90](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[rupadana/filament-api-service

A simple api service for supporting filamentphp

208114.4k7](/packages/rupadana-filament-api-service)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

1152.3k1](/packages/lettermint-lettermint-laravel)

PHPackages © 2026

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