PHPackages                             packet-grid/php-server-sdk - 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. packet-grid/php-server-sdk

ActiveLibrary

packet-grid/php-server-sdk
==========================

The PacketGrid PHP SDK for servers

08PHP

Since Jan 16Pushed 6y agoCompare

[ Source](https://github.com/blitzm-abgier/packet-grid-php-server-sdk)[ Packagist](https://packagist.org/packages/packet-grid/php-server-sdk)[ RSS](/packages/packet-grid-php-server-sdk/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Packet Grid PHP Server SDK
==========================

[](#packet-grid-php-server-sdk)

Install with Composer via Packagist Repo
----------------------------------------

[](#install-with-composer-via-packagist-repo)

- `composer require packet-grid/php-server-sdk` ()

Setup
-----

[](#setup)

When you want to use the SDK you have to make sure to pass your Packet Grid tenant id and Packet Grid api key in the PacketGrid constructor. The third field is optional, if set to true then you will be using the production Packet Grid environment. If left empty or set as false, then the SDK will default to your Packet Grid sandbox environment.

It is recommend that you store this variables in an environment file away rather than in your source code.

```
/**
  * $tenant_id Your Packet Grid tenant id
  * $api_key Your Packet Grid API key
  * $is_production Use the production
  */
$packetGrid = new PacketGrid($tenant_id, $api_key, $is_production);
```

Creating a Client Token
-----------------------

[](#creating-a-client-token)

```
// Instantiate the Packet Grid SDK
$packetGrid = new PacketGrid($tenant_id, $api_key, $is_production);

$tokenRequest = new CreateClientToken();
$tokenRequest->setUserId('yourUniqueUserId');

$response = $packetGrid->tokens->createClientToken($tokenRequest);
$token = $response->getToken();
```

Sending a Notification
----------------------

[](#sending-a-notification)

```
// Instantiate the Packet Grid SDK
$packetGrid = new PacketGrid($tenant_id, $api_key, $is_production);

// Create our notification object
$notification = new SendNotification();

// Set the notification recipients
$recipient = new Recipient();
$recipient->setUsername('username');
$recipient->setEmail('user@gmail.com');
$recipient->setPhone('+61434882753'); // If you have a mobile number like 0434882753, format it as +61434882753 (removing the 0)

$notification->setRecipients([
  $recipient
]);

// Set the notification text
$notification->setTitle('Notification Title');
$notification->setDetail('Notification details...');

// Set the payload, which is optional
$notification->setPayload([
  'anyKey' => 'anyValue'
]);

// Set the desired transport channels
$notification->setTransports([
  TransportEnum::EMAIL,
  TransportEnum::FCM,
  TransportEnum::SMS,
]);

// Dispatch our notification
$packetGrid->notifications->send($notification);
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7eec2211ccf46c500e2a3a9fb047a02ffb30ef84d0b975ae38889cbd06639aa9?d=identicon)[blitzm](/maintainers/blitzm)

---

Top Contributors

[![abgier-blitzm](https://avatars.githubusercontent.com/u/50001415?v=4)](https://github.com/abgier-blitzm "abgier-blitzm (2 commits)")

### Embed Badge

![Health badge](/badges/packet-grid-php-server-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/packet-grid-php-server-sdk/health.svg)](https://phpackages.com/packages/packet-grid-php-server-sdk)
```

PHPackages © 2026

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