Download the PHP package bassem-shoukry/laravel-chatwoot without Composer
On this page you can find all versions of the php package bassem-shoukry/laravel-chatwoot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bassem-shoukry/laravel-chatwoot
More information about bassem-shoukry/laravel-chatwoot
Files in bassem-shoukry/laravel-chatwoot
Package laravel-chatwoot
Short Description Typed Chatwoot API client and webhook receiver for Laravel.
License MIT
Homepage https://github.com/bassem-shoukry/laravel-chatwoot
Informations about the package laravel-chatwoot
Laravel Chatwoot
Typed Chatwoot API client and webhook receiver for Laravel.
- Strongly-typed DTOs (
Conversation,Message,Contact,Inbox, …) - Resource gateways (
Chatwoot::messages(),Chatwoot::conversations(), …) - HMAC-verified webhook controller with typed events
- Multi-account, immutable account switching
- SSRF guard, scrubbed request/response logging, automatic retry on
429/5xx - Built-in
ChatwootFakefor tests - PHP 8.3 / 8.4 · Laravel 11 / 12 / 13
Install
Set the env keys:
The CHATWOOT_API_TOKEN is a Chatwoot User Access Token (Profile → Access
Token). Tokens stored in config are decrypted with the application key on read,
so you may store them encrypted using Crypt::encryptString for defence in
depth.
Send messages
Find or create a contact, then a conversation
Useful when reacting to an inbound message on a channel keyed by a source_id
(e.g. WhatsApp's wa_id):
Multi-account
account() returns an immutable, scoped manager — it never mutates the shared
singleton.
Receive webhooks
Routes are opt-in. Register them where you control the URL prefix and middleware:
This exposes:
POST /api/webhooks/chatwoot— uses the default accountPOST /api/webhooks/chatwoot/{account}— multi-account fan-in
Every payload is verified against chatwoot.accounts.{account}.webhook.secret
(or the global chatwoot.webhooks.secret) using HMAC-SHA256 against the raw
body. Verification is on by default; set verify_signature to false
explicitly only when you must.
Listen for events:
Available events: WebhookReceived, MessageCreated, MessageUpdated,
ConversationCreated, ConversationUpdated, ConversationStatusChanged,
ContactCreated, ContactUpdated.
Tracking (opt-in)
Set CHATWOOT_TRACKING_ENABLED=true to enable the package migrations:
chatwoot_contactschatwoot_conversationschatwoot_messageschatwoot_webhook_events
Then publish + run:
Persistence itself is not automatic — write your own listeners using the provided Eloquent models so you control sync semantics.
Testing
Or just Http::fake() against the Chatwoot endpoints — the package's
ApiClient is a regular Laravel HTTP client.
Security notes
- Tokens read from config are decrypted automatically when encrypted with
Crypt::encryptString. chatwoot.allow_local_urlsisfalseby default. Loopback hosts (localhost, 127.0.0.1, ::1, 0.0.0.0) and non-http(s) schemes are rejected during account resolution to limit SSRF.- Outgoing logs scrub
Authorization,api_access_token,hmac_token,Cookieand known sensitive payload keys. - Webhook signatures are checked with
hash_equals. Default is strict: no signature → 401.
Support
Bug reports and feature requests: GitHub Issues. See CHANGELOG.md for release notes.
License
MIT — see LICENSE.md.
All versions of laravel-chatwoot with dependencies
ext-json Version *
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
psr/log Version ^3.0
spatie/laravel-package-tools Version ^1.16