octopusteam/waapi-laravel

WAAPI whatsapp api integration for Laravel

Fund package maintenance!
octopus-software-team

Installs: 36

Dependents: 0

Suggesters: 0

Security: 0

Stars: 12

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/octopusteam/waapi-laravel

v1.1.0+1 2025-10-21 19:25 UTC

This package is auto-updated.

Last update: 2025-10-21 19:51:59 UTC


README

Latest Version on Packagist Total Downloads License

https://waapi.octopusteam.net
Simple and flexible WhatsApp API integration for Laravel, built by Octopus Team.
This package provides an easy way to send WhatsApp messages using WAAPI.

๐Ÿ› ๏ธ Compatibility

This package supports the following Laravel and PHP versions:

Laravel Version PHP Version(s) Supported
12.x 8.3, 8.4 โœ…
11.x 8.2, 8.3 โœ…
10.x 8.1, 8.2, 8.3 โœ…
9.x 8.0, 8.1, 8.2 โœ…
8.x 7.4, 8.0, 8.1 โš ๏ธ (no longer officially supported by Laravel, but package works)

โ„น๏ธ We recommend always using the latest Laravel LTS and PHP stable versions for security and performance.

๐Ÿ“ฆ Installation

Install via Composer:

composer require octopusteam/waapi-laravel

โš™๏ธ Configuration

  1. Publish the config file:
php artisan vendor:publish --provider="OctopusTeam\Waapi\WaapiServiceProvider" --tag="config"
  1. A new config file will be created at:
config/waapi.php
  1. Update your .env with your WAAPI credentials with the following variables in config/waapi.php:
WAAPI_URL=https://waapi.octopusteam.net/api/create-message
WAAPI_APP_KEY=your_app_key
WAAPI_AUTH_KEY=your_auth_key

# Webhook
WAAPI_WEBHOOK_URL=/api/webhook/whatsapp
WAAPI_WEBHOOK_ENABLED=true
WAAPI_WEBHOOK_AUTO_REGISTER=true

# Webhook.site 
WAAPI_WEBHOOK_SITE_TOKEN=your-webhook-site-token

๐Ÿ”‘ Get Your API Key

To use this package, you need to create an account and generate your WAAPI keys:

  1. Go to ๐Ÿ‘‰ https://waapi.octopusteam.net
  2. Sign up for a free trial (7 days available ๐Ÿš€)
  3. Choose a subscription plan (affordable options for continued API access)
  4. After login, go to My Apps โ†’ Integration
  5. Copy your appkey and authkey from the dashboard

๐Ÿš€ Usage

Using the Facade (Recommended)

Since v1.0.6, the package includes a Waapi facade for easier static access:

use Waapi;

Waapi::sendOtp('201234567890', '123456');
Waapi::sendMessage('201234567890', 'Hello from Octopus Team ๐Ÿš€');

Send WhatsApp Message

use Waapi;

$phone   = '201234567890';
$message = 'Hello from Octopus Team ๐Ÿš€';

$response = Waapi::sendMessage($phone, $message);

if ($response->successful()) {
    echo "Message sent successfully!";
} else {
    echo "Failed to send message.";
}

๐Ÿงช Testing

This package comes with a basic test example.

Run tests with:

php artisan test

๐Ÿ“– Example Test

See tests/Feature/WaapiTest.php for a sample test:

$response = Waapi::sendMessage('201234567890', 'Hello from Waapi Test ๐Ÿš€');
$this->assertNotNull($response);

๐Ÿค Contributing

Contributions are welcome!
Please open issues and submit pull requests to help improve this package.

๐Ÿ“œ License

This package is open-sourced software licensed under the MIT license.

โœจ Credits