PHPackages                             gidix/pushnotifier-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. [API Development](/categories/api)
4. /
5. gidix/pushnotifier-php

ActiveLibrary[API Development](/categories/api)

gidix/pushnotifier-php
======================

PushNotifier library for PHP

2.0(8y ago)4152[1 issues](https://github.com/GIDIX/pushnotifier-php/issues)proprietaryPHPPHP &gt;=7.0.0

Since Jan 1Pushed 5y ago2 watchersCompare

[ Source](https://github.com/GIDIX/pushnotifier-php)[ Packagist](https://packagist.org/packages/gidix/pushnotifier-php)[ RSS](/packages/gidix-pushnotifier-php/feed)WikiDiscussions master Synced 3w ago

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

PushNotifier (v2) for PHP
=========================

[](#pushnotifier-v2-for-php)

A pretty convenient library to use PushNotifier in PHP projects.

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

[](#installation)

Add this to `composer.json`:

```
"require": {
	"gidix/pushnotifier-php": "^2.0.0"
}
```

...or run `composer require gidix/pushnotifier-php`

Usage
-----

[](#usage)

You only have to use one class: `GIDIX\PushNotifier\SDK\PushNotifier`. Everything is derived from there.

### Creating your Application

[](#creating-your-application)

Before you can actually do anything, you have to create your application. It consists of an API Token and a package name. Both can be configured at [pushnotifier.de/account/api](https://pushnotifier.de/account/api).

Then you can create your instance:

```
    $app = new GIDIX\PushNotifier\SDK\PushNotifier([
        'api_token'     =>  'YOUR_API_TOKEN',
        'package'       =>  'YOUR.PACKAGE.NAME'
    ]);
```

### Login

[](#login)

When authenticating as a user you have to log them in, then use their AppToken for all further communication:

```
    $appToken = $app->login('username', 'password');
```

You can store `$appToken` anywhere you like by converting it to a string before storing (see `examples/storing-app-token.php`).

Afterwards you can use the AppToken to authenticate:

```
    $app = new GIDIX\PushNotifier\SDK\PushNotifier([
        'api_token'     =>  'YOUR_API_TOKEN',
        'package'       =>  'YOUR.PACKAGE.NAME',
        'app_token'     =>  $appToken
    ]);
```

### Retrieving Devices

[](#retrieving-devices)

```
    $devices = $app->getDevices();
```

will retrieve an array of `GIDIX\PushNotifier\SDK\Device` objects, containing an ID, a title, a model and a link to an image of the device. Device IDs do *not* change over time and serve as a unique identifier.

### Sending Texts

[](#sending-texts)

```
    $result = $app->sendMessage($devices, 'Some Content');
```

`$devices` has to be an array of either `Device` objecs or device ID strings, i.e. `['abc', 'xyz']`.

### Sending URLs

[](#sending-urls)

```
    $result = $app->sendURL($devices, 'https://some.example.org/with/path.html');
```

`$devices` has to be an array of either `Device` objecs or device ID strings, i.e. `['abc', 'xyz']`.

### Sending Notifications

[](#sending-notifications)

```
    $result = $app->sendNotification($devices, 'Some Content', 'https://some.example.org/with/path.html');
```

Exceptions
----------

[](#exceptions)

- **DeviceNotFoundException**: When a device couldn't be found
- **InvalidAPITokenException**: When the api\_token or package couldn't be verified
- **InvalidAppTokenException**: When the AppToken couldn't be verified or has expired
- **InvalidCredentialsException**: When login credentials were incorrect
- **InvalidRequestException**: When some request data was malformatted, i.e. malformatted URL for notifications
- **PushNotifierException**: Base Exception for all these, only thrown in case of an unknown error (500)

`$devices` has to be an array of either `Device` objecs or device ID strings, i.e. `['abc', 'xyz']`.

Examples
--------

[](#examples)

Examples can be found in `examples/` of this repository.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

3094d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/357398?v=4)[Benjamin Schmidt](/maintainers/bluefirex)[@bluefirex](https://github.com/bluefirex)

---

Top Contributors

[![bluefirex](https://avatars.githubusercontent.com/u/357398?v=4)](https://github.com/bluefirex "bluefirex (3 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/gidix-pushnotifier-php/health.svg)

```
[![Health](https://phpackages.com/badges/gidix-pushnotifier-php/health.svg)](https://phpackages.com/packages/gidix-pushnotifier-php)
```

###  Alternatives

[bandwidth/sdk

Bandwidth's set of APIs

16980.0k1](/packages/bandwidth-sdk)[messagemedia/messages-sdk

The MessageMedia Messages API provides a number of endpoints for building powerful two-way messaging applications.

12413.0k](/packages/messagemedia-messages-sdk)[vittominacori/coinmarketcap-php

A PHP wrapper for CoinMarketCap API

2134.0k](/packages/vittominacori-coinmarketcap-php)[hok00age/rajaongkir

PHP client for consuming RajaOngkir API

131.3k](/packages/hok00age-rajaongkir)

PHPackages © 2026

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