Download the PHP package darkclow4/laravel-waha-messages without Composer
On this page you can find all versions of the php package darkclow4/laravel-waha-messages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-waha-messages
Laravel WAHA Messages
A Laravel package for seamless integration with WAHA (WhatsApp HTTP API). Send messages, manage sessions, handle groups, contacts, and chats — all through a clean, fluent API.
[!WARNING] Unofficial API Notice WAHA is an unofficial WhatsApp API. Please use this package responsibly. Sending messages too quickly, sending spam, or violating WhatsApp's Terms of Service may result in your WhatsApp number being permanently banned or blocked by Meta. Use at your own risk.
Requirements
- PHP 8.3+
- Laravel 11.x or above
- A running WAHA instance
Installation
Add the package to your Laravel project:
The service provider and facade are auto-discovered. To publish the config file:
Configuration
Add the following to your .env file:
| Variable | Description | Default |
|---|---|---|
WAHA_URL |
Base URL of your WAHA server | http://localhost:3000 |
WAHA_API_KEY |
API key for authentication | null |
WAHA_SESSION |
Default session name | default |
WAHA_TIMEOUT |
Request timeout (seconds) | 30 |
WAHA_CONNECT_TIMEOUT |
Connection timeout (seconds) | 10 |
WAHA_RETRY_TIMES |
Number of retry attempts | 3 |
WAHA_RETRY_SLEEP |
Delay between retries (ms) | 100 |
Quick Start
Usage
Sending Messages
Text Message
Image Message
Video Message
File / Document Message
Location Message
Contact vCard
Mark as Seen
Typing Indicator
Human-Like Messaging
Send messages that simulate real human behavior. The flow automatically executes in this order:
- Mark as seen — Read receipt appears on the chat
- Start typing — Typing indicator shows up
- Delay — Waits based on the message character count
- Stop typing — Typing indicator disappears
- Send message — The actual message is delivered
Configuring Typing Speed
You can fine-tune the typing delay using a fluent API:
| Option | Description | Default |
|---|---|---|
msPerChar(int) |
Milliseconds per character | 300 |
minDelay(int) |
Minimum delay in ms | 2000 |
maxDelay(int) |
Maximum delay in ms | 10000 |
Tip: A short message like "Hi!" (3 chars × 300ms = 900ms) will use the
minDelayinstead. A very long message will be capped atmaxDelay.
Session Management
Chat Management
Group Management
Contact Management
Using the Client Directly
You can also inject WahaClient directly via dependency injection:
Error Handling
The package throws specific exceptions for API errors:
Chat ID Format
WAHA uses the following chat ID formats:
| Type | Format | Example |
|---|---|---|
| Individual | {phone}@c.us |
[email protected] |
| Group | {id}@g.us |
[email protected] |
Note: Phone numbers should include the country code without the
+prefix.
License
MIT
All versions of laravel-waha-messages with dependencies
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0