PHPackages                             disintegrations/shad-serializer-laravel - 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. [API Development](/categories/api)
4. /
5. disintegrations/shad-serializer-laravel

ActiveLibrary[API Development](/categories/api)

disintegrations/shad-serializer-laravel
=======================================

Laravel client for serializing and sending encrypted Shad Messenger requests.

1.0.0(1mo ago)00MITPHPPHP ^8.4CI passing

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/disintegrations/shad-serializer-laravel)[ Packagist](https://packagist.org/packages/disintegrations/shad-serializer-laravel)[ RSS](/packages/disintegrations-shad-serializer-laravel/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Shad Serializer
===============

[](#shad-serializer)

Laravel client for serializing, encrypting, signing, sending, and decrypting Shad Messenger HTTP API requests.

This is an unofficial package based on observed Shad web-client behavior. The protocol is undocumented and may change.

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

[](#installation)

Requires PHP 8.4 or newer, OpenSSL, and Laravel 12 or newer. GitHub Actions tests the package on PHP 8.4 and PHP 8.5.

```
composer require disintegrations/shad-serializer-laravel
```

Laravel package discovery registers the service provider automatically.

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

[](#configuration)

```
php artisan vendor:publish --tag=shad-config
```

```
SHAD_API_URL=https://shadmessenger2.iranlms.ir
SHAD_API_VERSION=6
SHAD_APP_VERSION=4.4.26
SHAD_LANGUAGE=fa
SHAD_TIMEOUT=20
```

For an existing session, configure `SHAD_AUTH` and `SHAD_PRIVATE_KEY_PEM`. API v6 authorized requests require both values. Keep them secret.

Usage
-----

[](#usage)

```
use Disintegrations\ShadSerializer\ShadClient;

$shad = app(ShadClient::class);

$sent = $shad->sendCode('98912...');
$session = $shad->signIn('98912...', $sent['phone_code_hash'], '123456');
$shad->registerDevice();
$shad->saveState(storage_path('app/shad-state.json'));

$chats = $shad->getChats();
$shad->sendMessage('u0...', 'Hello from Laravel');
$shad->sendFile('u0...', storage_path('app/document.pdf'));
```

Load a saved session without Laravel's container:

```
$shad = ShadClient::loadState(storage_path('app/shad-state.json'));
$result = $shad->callData('getMySessions');
```

Use the facade:

```
use Disintegrations\ShadSerializer\Facades\Shad;

$chats = Shad::getChats();
```

Use the protocol serializer directly:

```
use Disintegrations\ShadSerializer\Protocol\ShadProtocol;

$encrypted = ShadProtocol::encryptData(['method' => 'example'], $auth);
$decoded = ShadProtocol::decryptData($encrypted, $auth);
```

The client also includes the Python package's chat, message, contact, channel, folder, data-center discovery, multipart upload, and ranged download helpers.

Testing
-------

[](#testing)

```
composer install
composer test
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

45d ago

### Community

Maintainers

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

---

Top Contributors

[![disintegrations](https://avatars.githubusercontent.com/u/288711451?v=4)](https://github.com/disintegrations "disintegrations (2 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/disintegrations-shad-serializer-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/disintegrations-shad-serializer-laravel/health.svg)](https://phpackages.com/packages/disintegrations-shad-serializer-laravel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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