ges/laravel-green-api

Core Green API integration for Laravel.

Maintainers

Package info

github.com/TechGES/Laravel-green-api

pkg:composer/ges/laravel-green-api

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.1.0 2026-03-14 22:53 UTC

This package is auto-updated.

Last update: 2026-03-14 23:23:17 UTC


README

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

Install

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

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

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

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.