{"id":35227605,"url":"https://github.com/octopus-software-team/waapi-laravel","last_synced_at":"2026-01-12T14:37:35.200Z","repository":{"id":316287954,"uuid":"1062753160","full_name":"octopus-software-team/waapi-laravel","owner":"octopus-software-team","description":"Simple and flexible WhatsApp API integration for Laravel, built by Octopus Team. This package provides an easy way to send WhatsApp messages using WAAPI.","archived":false,"fork":false,"pushed_at":"2026-01-10T11:46:00.000Z","size":637,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T03:34:23.555Z","etag":null,"topics":["laravel","whatsapp-api","whatsapp-bot","whatsapp-php"],"latest_commit_sha":null,"homepage":"https://waapi.octopusteam.net","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octopus-software-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-23T17:19:20.000Z","updated_at":"2026-01-10T11:46:04.000Z","dependencies_parsed_at":"2025-09-23T19:31:22.524Z","dependency_job_id":null,"html_url":"https://github.com/octopus-software-team/waapi-laravel","commit_stats":null,"previous_names":["octopus-software-team/waapi-laravel"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/octopus-software-team/waapi-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-software-team%2Fwaapi-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-software-team%2Fwaapi-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-software-team%2Fwaapi-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-software-team%2Fwaapi-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octopus-software-team","download_url":"https://codeload.github.com/octopus-software-team/waapi-laravel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-software-team%2Fwaapi-laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","whatsapp-api","whatsapp-bot","whatsapp-php"],"created_at":"2025-12-30T01:35:47.019Z","updated_at":"2026-01-12T14:37:35.179Z","avatar_url":"https://github.com/octopus-software-team.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WAAPI Laravel Package\n\n![WAAPI Logo](assets/cover.jpg)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/octopusteam/waapi-laravel.svg?style=flat-square)](https://packagist.org/packages/octopusteam/waapi-laravel)\n[![Total Downloads](https://img.shields.io/packagist/dt/octopusteam/waapi-laravel.svg?style=flat-square)](https://packagist.org/packages/octopusteam/waapi-laravel)\n[![License](https://img.shields.io/packagist/l/octopusteam/waapi-laravel.svg?style=flat-square)](https://packagist.org/packages/octopusteam/waapi-laravel)\n\nThis package provides a simple and expressive API for interacting with the WAAPI (WhatsApp API) service within a Laravel application.\n\n## Features\n\n- Send text messages, media, templates, stickers, voice notes, locations, and contacts.\n- Fluent and expressive API.\n- Automatic webhook route registration.\n- **New** `WebhookReceived` event for incoming data.\n- Integration with Webhook.site for easy debugging.\n- Artisan command to renew Webhook.site token.\n\n## Installation\n\n```bash\ncomposer require octopusteam/waapi-laravel\n```\n\nPublish the configuration file:\n\n```bash\nphp artisan vendor:publish --provider=\"OctopusTeam\\Waapi\\WaapiServiceProvider\"\n```\n\nThis will create a `config/waapi.php` file in your application.\n\n## Configuration\n\nUpdate your `.env` file with your WAAPI credentials:\n\n```\nWAAPI_APP_URL=https://waapi.octopusteam.net/api/create-message\nWAAPI_APP_KEY=your_app_key\nWAAPI_AUTH_KEY=your_auth_key\nWAAPI_WEBHOOK_SITE_TOKEN=your_webhook_site_token\nWAAPI_UPDATE_DEVICE_WEBHOOK=your_device_uuid_for_webhook_update\n```\n\n## Usage\n\n### Sending Messages\n\nYou can send messages using the `Waapi` facade or by injecting the `Waapi` class.\n\n```php\nuse OctopusTeam\\Waapi\\Facades\\Waapi;\n\n// Send a simple text message\nWaapi::sendMessage('201xxxxxxxxx', 'Hello, world!');\n\n// Send an OTP with custom message\n$otp = Waapi::generateOtp();\nWaapi::sendOtp('201xxxxxxxxx', $otp, false, false, \":otp is your verification code.\");\n\n// Send Media (File)\nWaapi::sendMedia('201xxxxxxxxx', 'Here is your invoice', 'https://example.com/invoice.pdf');\n\n// Send Template\nWaapi::sendTemplate('201xxxxxxxxx', 'template_id', [\n    'variables[{1}]' =\u003e 'Value 1',\n    'variables[{2}]' =\u003e 'Value 2'\n]);\n\n// Send Sticker\nWaapi::sendSticker('201xxxxxxxxx', 'https://example.com/sticker.webp');\n\n// Send Voice Note\nWaapi::sendVoice('201xxxxxxxxx', 'https://example.com/voice.mp3');\n\n// Send Location\nWaapi::sendLocation('201xxxxxxxxx', '30.0444', '31.2357');\n\n// Send Contact\nWaapi::sendContact('201xxxxxxxxx', 'John Doe', '201xxxxxxxxx', 'Octopus Team');\n```\n\n### Device Status \u0026 QR Code\n\n```php\n// Get Device Status\n$status = Waapi::getDeviceStatus('device_id');\n\n// Get QR Code\n$qr = Waapi::getQrCode('device_id');\n```\n\n### Webhook Handling\n\nThe package can automatically register a webhook route to handle incoming data from WAAPI. To enable this, ensure the following is in your `config/waapi.php`:\n\n```php\n'webhook' =\u003e [\n    'enabled' =\u003e true,\n    'auto_register' =\u003e true,\n],\n```\n\nBy default, the route is `POST /api/webhook/whatsapp`.\n\n#### Events\n\nWhen a webhook is received, the package fires the `OctopusTeam\\Waapi\\Events\\WebhookReceived` event. You can listen to this event in your application's `EventServiceProvider`.\n\n```php\nuse OctopusTeam\\Waapi\\Events\\WebhookReceived;\n\nprotected $listen = [\n    WebhookReceived::class =\u003e [\n        SendEmailNotification::class,\n    ],\n];\n```\n\nThe event contains the webhook data in the `$data` property.\n\n### Webhook.site Integration\n\nFor development and debugging, you can use the Webhook.site integration to inspect incoming webhook data.\n\n```php\n// Get the last 50 requests from Webhook.site\n$data = Waapi::getWebhookSiteData(50);\n\n// Get the decoded content from the last 50 requests\n$content = Waapi::getWebhookSiteContent(50);\n\n// Get a specific request by its ID\n$request = Waapi::getWebhookSiteRequest('request-uuid');\n```\n\n### Artisan Command\n\nTo renew your `webhook.site` token automatically, you can run the following Artisan command. This will generate a new token, update your `.env` file, and update the webhook URL via the WAAPI service.\n\n```bash\nphp artisan waapi:webhook-renew\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctopus-software-team%2Fwaapi-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctopus-software-team%2Fwaapi-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctopus-software-team%2Fwaapi-laravel/lists"}