PHPackages                             alareqi/wasender-extend - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alareqi/wasender-extend

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alareqi/wasender-extend
=======================

This package add extended functionality to Wasender

v1.0.8(9mo ago)111[4 PRs](https://github.com/aymanalareqi/wasender-extend/pulls)MITPHPPHP ^8.4CI passing

Since Sep 16Pushed 2mo agoCompare

[ Source](https://github.com/aymanalareqi/wasender-extend)[ Packagist](https://packagist.org/packages/alareqi/wasender-extend)[ Docs](https://github.com/aymanalareqi/wasender-extend)[ GitHub Sponsors]()[ RSS](/packages/alareqi-wasender-extend/feed)WikiDiscussions main Synced today

READMEChangelog (9)Dependencies (13)Versions (15)Used By (0)

Wasender Extend
===============

[](#wasender-extend)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e25fbd7830098a3b3bb43ed66d0592be4ee46845d660ff275f605c9a4e2c642c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c61726571692f776173656e6465722d657874656e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alareqi/wasender-extend)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9aa1fa10c54c5d7b0695bc0be7ffee14fd17f1ac820072ce73a0caa7e6bf5508/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616c61726571692f776173656e6465722d657874656e642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/alareqi/wasender-extend/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/41e922b0658baac2686721b5dc8ac2270644f0d521c124467ae98dc3a99a940e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616c61726571692f776173656e6465722d657874656e642f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/alareqi/wasender-extend/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5a1ae9f5a72582d5f5988296350917014ec5b10a99993e752682b3e7767505e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c61726571692f776173656e6465722d657874656e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alareqi/wasender-extend)

**Wasender Extend** is a Laravel package that provides extended functionality for the Wasender WhatsApp messaging platform. This package adds essential API endpoints for WhatsApp session management, QR code generation, and contact verification, making it easier to integrate WhatsApp functionality into your Laravel applications.

Features
--------

[](#features)

- **WhatsApp Contact Verification**: Check if a phone number is registered on WhatsApp
- **QR Code Generation**: Generate QR codes for WhatsApp Web authentication
- **Session Management**: Check and manage WhatsApp session status
- **Device Management**: Handle WhatsApp device connections and status
- **API Authentication**: Secure API endpoints with user authentication and app key validation
- **Laravel Integration**: Seamless integration with Laravel applications using service providers and facades

Requirements
------------

[](#requirements)

- PHP 8.4 or higher
- Laravel 11.0 or 12.0
- A running WhatsApp server instance (WA\_SERVER\_URL environment variable)

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require alareqi/wasender-extend
```

The package will automatically register its service provider and facade.

### Configuration

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --tag="wasender-extend-config"
```

This will publish the configuration file to `config/wasender-extend.php`. Currently, the package uses environment variables for configuration.

### Environment Variables

[](#environment-variables)

Add the following environment variables to your `.env` file:

```
# WhatsApp Server URL (required)
WA_SERVER_URL=http://your-whatsapp-server-url

# Optional: API rate limiting settings
# The package uses Laravel's built-in throttle middleware
```

### Database Requirements

[](#database-requirements)

The package expects the following database tables to exist in your application:

- `users` table with columns: `id`, `status`, `will_expire`, `authkey`
- `apps` table with columns: `id`, `key`, `status` and relationship to `devices`
- `devices` table with columns: `id`, `status`, `user_name`, `phone`, `qr`

These tables should be part of your main Wasender application.

Usage
-----

[](#usage)

The package provides three main API endpoints for WhatsApp functionality. All endpoints require authentication via `authkey` and `appkey` parameters.

### Authentication

[](#authentication)

All API requests must include:

- `authkey`: User authentication key
- `appkey`: Application key associated with a WhatsApp device

### Available Endpoints

[](#available-endpoints)

#### 1. Check if Number is on WhatsApp

[](#1-check-if-number-is-on-whatsapp)

**Endpoint:** `POST /api/misc/on-whatsapp`

Check if a phone number is registered on WhatsApp.

**Request:**

```
{
    "authkey": "your-auth-key",
    "appkey": "your-app-key",
    "whatsapp_id": "1234567890"
}
```

**Response:**

```
{
    "status": true,
    "message": "Number is on WhatsApp"
}
```

#### 2. Generate QR Code

[](#2-generate-qr-code)

**Endpoint:** `POST /api/qr`

Generate a QR code for WhatsApp Web authentication.

**Request:**

```
{
    "authkey": "your-auth-key",
    "appkey": "your-app-key"
}
```

**Response:**

```
{
    "qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "message": "QR code generated successfully"
}
```

#### 3. Check Session Status

[](#3-check-session-status)

**Endpoint:** `POST /api/check-session`

Check the current WhatsApp session status for a device.

**Request:**

```
{
    "authkey": "your-auth-key",
    "appkey": "your-app-key"
}
```

**Response:**

```
{
    "message": "Device Connected Successfully",
    "connected": true,
    "phone": "1234567890"
}
```

### Error Responses

[](#error-responses)

All endpoints may return the following error responses:

**401 Unauthorized - Invalid Authentication:**

```
{
    "error": "Invalid Auth and AppKey"
}
```

**401 Validation Error:**

```
{
    "message": "Validation error",
    "errors": {
        "whatsapp_id": ["The whatsapp id field is required."]
    }
}
```

**404 Device Not Found:**

```
{
    "message": "Device not found"
}
```

### Using the Facade

[](#using-the-facade)

You can also use the package facade in your Laravel application:

```
use Alareqi\WasenderExtend\Facades\WasenderExtend;

// The facade is available but the main functionality
// is provided through the API endpoints
```

### Using the Command

[](#using-the-command)

The package includes a basic Artisan command:

```
php artisan wasender-extend
```

Testing
-------

[](#testing)

```
composer test
```

Run code analysis:

```
composer analyse
```

Format code:

```
composer format
```

Package Structure
-----------------

[](#package-structure)

```
src/
├── Commands/
│   └── WasenderExtendCommand.php     # Artisan command
├── Facades/
│   └── WasenderExtend.php            # Package facade
├── Http/
│   └── Controllers/
│       └── Api/
│           └── MiscController.php    # Main API controller
├── WasenderExtend.php                # Main package class
└── WasenderExtendServiceProvider.php # Service provider

```

Configuration
-------------

[](#configuration-1)

The package uses Laravel's service container and is configured through environment variables. The main configuration points are:

- **WA\_SERVER\_URL**: The URL of your WhatsApp server instance
- **Database Models**: The package expects `User`, `App`, and `Device` models to exist in your application
- **Middleware**: Uses Laravel's built-in `throttle:api` middleware for rate limiting

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ayman Alareqi](https://github.com/aymanalareqi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance73

Regular maintenance activity

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

9

Last Release

279d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9856614e15a47a8e1eba3b2bc64993fb935ab74de34d4e40b8115bc51f9ff18?d=identicon)[alareqi](/maintainers/alareqi)

---

Top Contributors

[![aymanalareqi](https://avatars.githubusercontent.com/u/77433449?v=4)](https://github.com/aymanalareqi "aymanalareqi (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelAyman Alareqiwasender-extend

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/alareqi-wasender-extend/health.svg)

```
[![Health](https://phpackages.com/badges/alareqi-wasender-extend/health.svg)](https://phpackages.com/packages/alareqi-wasender-extend)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
