PHPackages                             scary-layer/exponent-server-sdk-php - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. scary-layer/exponent-server-sdk-php

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

scary-layer/exponent-server-sdk-php
===================================

Server-side library for working with Expo push notifications using PHP

1.3.0(4y ago)042MITPHPPHP &gt;=7.0

Since Jul 19Pushed 3y agoCompare

[ Source](https://github.com/scary-layer/exponent-server-sdk-php)[ Packagist](https://packagist.org/packages/scary-layer/exponent-server-sdk-php)[ RSS](/packages/scary-layer-exponent-server-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

exponent-server-sdk-php
=======================

[](#exponent-server-sdk-php)

Server-side library for working with Expo push notifications using PHP

[![Latest Stable Version](https://camo.githubusercontent.com/2e42e7d8f904d8fa15cb475fd0945e147d76c8ae878f72688bf21d150a0615f6/68747470733a2f2f706f7365722e707567782e6f72672f616c796d6f73756c2f6578706f6e656e742d7365727665722d73646b2d7068702f762f737461626c65)](https://packagist.org/packages/alymosul/exponent-server-sdk-php)[![License](https://camo.githubusercontent.com/79df3ed65f0ee608319e4fea261c7f0f9455b4c6c7dabf40cfd92eb3770cc293/68747470733a2f2f706f7365722e707567782e6f72672f616c796d6f73756c2f6578706f6e656e742d7365727665722d73646b2d7068702f6c6963656e7365)](https://packagist.org/packages/alymosul/exponent-server-sdk-php)[![Total Downloads](https://camo.githubusercontent.com/343fc9a6f16248d634f6f0ae2a173586705544734119f18c383efc41790dd789/68747470733a2f2f706f7365722e707567782e6f72672f616c796d6f73756c2f6578706f6e656e742d7365727665722d73646b2d7068702f646f776e6c6f616473)](https://packagist.org/packages/alymosul/exponent-server-sdk-php)

Usage
=====

[](#usage)

- Require the package in your project

```
composer require alymosul/exponent-server-sdk-php
```

- In a php file

```
    require_once __DIR__.'/vendor/autoload.php';

    $channelName = 'news';
    $recipient= 'ExponentPushToken[unique]';

    // You can quickly bootup an expo instance
    $expo = \ExponentPhpSDK\Expo::normalSetup();

    // Subscribe the recipient to the server
    $expo->subscribe($channelName, $recipient);

    // Build the notification data
    $notification = ['body' => 'Hello World!'];

    // Notify an interest with a notification
    $expo->notify([$channelName], $notification);
```

Data can be added to notifications by providing it as a JSON object. For example:

```
// Build the notification data
$notification = ['body' => 'Hello World!', 'data'=> json_encode(array('someData' => 'goes here'))];
```

Channel name
============

[](#channel-name)

You can use channels to send a notification to only one user, or to a group of users:

One recipient
-------------

[](#one-recipient)

In order to target one recipient (and avoid sending a notification to the wrong recipient), use a channel name specific to each user:

```
$channelName = 'user_528491';
$recipient = 'ExponentPushToken[unique]';

// …

// Subscribe the recipient to the server
$expo->subscribe($channelName, $recipient);

// …

// Notify an interest with a notification, only one recipient will receive it
$expo->notify([$channelName], $notification);
```

Several recipients
------------------

[](#several-recipients)

Declare a channel name that will be shared between the recipients:

```
$channelName = 'group_4815';

$recipient1 = 'ExponentPushToken[unique1]';
$recipient2 = 'ExponentPushToken[unique2]';

// …

// Subscribe the recipients to the server
$expo->subscribe($channelName, $recipient1);
$expo->subscribe($channelName, $recipient2);

// …

// Notify an interest with a notification, the 2 recipients will receive it
$expo->notify([$channelName], $notification);
```

```
// Build the notification data
$notification = ['body' => 'Hello World!', 'data'=> json_encode(array('someData' => 'goes here'))];
```

Additional security
===================

[](#additional-security)

If you set up enhanced security in your Expo Dashboard (as described [here](https://docs.expo.io/push-notifications/sending-notifications/#additional-security)), you will need to attach an authorization token to each push request:

```
    // ...

    // Bootup an expo instance
    $expo = \ExponentPhpSDK\Expo::normalSetup();

    // Fetch your access token from where you stored it
    $accessToken = 'your_expo_access_token';

    // The access token will be attached to every push request you make hereafter
    $expo->setAccessToken($accessToken);

    // Notify an interest with a notification
    $expo->notify([$channelName], $notification);
```

TODO
====

[](#todo)

- Need to create tests

Laravel driver
==============

[](#laravel-driver)

- There's an expo notifications driver built for laravel apps that's ready to use, you can find it here..

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~286 days

Recently: every ~257 days

Total

6

Last Release

1782d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88b8177c90c52cb107f7047e9c090fc0324ac6f1b1cf2eab80cb983141428325?d=identicon)[scary-layer](/maintainers/scary-layer)

---

Top Contributors

[![Alymosul](https://avatars.githubusercontent.com/u/8314647?v=4)](https://github.com/Alymosul "Alymosul (48 commits)")[![patrickkivits](https://avatars.githubusercontent.com/u/727174?v=4)](https://github.com/patrickkivits "patrickkivits (4 commits)")[![brynnb](https://avatars.githubusercontent.com/u/1271817?v=4)](https://github.com/brynnb "brynnb (3 commits)")[![francesco-laricchia](https://avatars.githubusercontent.com/u/45432953?v=4)](https://github.com/francesco-laricchia "francesco-laricchia (3 commits)")[![alexislefebvre](https://avatars.githubusercontent.com/u/2071331?v=4)](https://github.com/alexislefebvre "alexislefebvre (2 commits)")[![cvele](https://avatars.githubusercontent.com/u/644800?v=4)](https://github.com/cvele "cvele (2 commits)")[![theUNnicked](https://avatars.githubusercontent.com/u/16197344?v=4)](https://github.com/theUNnicked "theUNnicked (2 commits)")[![SaveYourTime](https://avatars.githubusercontent.com/u/35715664?v=4)](https://github.com/SaveYourTime "SaveYourTime (1 commits)")[![HappyFacade](https://avatars.githubusercontent.com/u/54226355?v=4)](https://github.com/HappyFacade "HappyFacade (1 commits)")[![DannyFeliz](https://avatars.githubusercontent.com/u/5460365?v=4)](https://github.com/DannyFeliz "DannyFeliz (1 commits)")[![AleksandarSavic95](https://avatars.githubusercontent.com/u/12213798?v=4)](https://github.com/AleksandarSavic95 "AleksandarSavic95 (1 commits)")[![kylekatarnls](https://avatars.githubusercontent.com/u/5966783?v=4)](https://github.com/kylekatarnls "kylekatarnls (1 commits)")[![OlaAlsaker](https://avatars.githubusercontent.com/u/7793873?v=4)](https://github.com/OlaAlsaker "OlaAlsaker (1 commits)")[![ospnko](https://avatars.githubusercontent.com/u/35662725?v=4)](https://github.com/ospnko "ospnko (1 commits)")[![rodolfobarretoweb](https://avatars.githubusercontent.com/u/914032?v=4)](https://github.com/rodolfobarretoweb "rodolfobarretoweb (1 commits)")

---

Tags

pushnotificationsexpoexponent

### Embed Badge

![Health badge](/badges/scary-layer-exponent-server-sdk-php/health.svg)

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

###  Alternatives

[alymosul/exponent-server-sdk-php

Server-side library for working with Expo push notifications using PHP

1541.5M14](/packages/alymosul-exponent-server-sdk-php)[minishlink/web-push

Web Push library for PHP

1.9k12.0M52](/packages/minishlink-web-push)[ivkos/pushbullet

Push notifications to devices and browsers via Pushbullet

21862.6k2](/packages/ivkos-pushbullet)[bentools/webpush-bundle

Send push notifications through Web Push Protocol to your Symfony users.

71274.3k](/packages/bentools-webpush-bundle)[minishlink/web-push-bundle

Symfony Bundle around the WebPush library

56318.3k2](/packages/minishlink-web-push-bundle)[dmitrovskiy/ionic-push-php

ionic push notifications php sdk

215.5k1](/packages/dmitrovskiy-ionic-push-php)

PHPackages © 2026

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