PHPackages                             httd1/fcmclient - 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. httd1/fcmclient

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

httd1/fcmclient
===============

A simple FCM client for PHP

v1.0.0(8mo ago)19MITPHPPHP ^8.0

Since Aug 28Pushed 8mo agoCompare

[ Source](https://github.com/httd1/fcmclient)[ Packagist](https://packagist.org/packages/httd1/fcmclient)[ RSS](/packages/httd1-fcmclient/feed)WikiDiscussions master Synced 1mo ago

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

FCM Client (PHP)
================

[](#fcm-client-php)

[![PHP](https://camo.githubusercontent.com/29e76b25f44fd19ba3a88f85f00b3ac7329ffd604075db0fbbeda87f6c794491/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302d626c7565)](https://www.php.net/)[![Packagist](https://camo.githubusercontent.com/fc5714328afefdd4547b80a67d54806b1f17408e2f3a285ff4e6ec3c6d31526e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6d706f7365722d5061636b6167652d627269676874677265656e)](https://packagist.org/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)

A simple **PHP client** to send messages with **Firebase Cloud Messaging (FCM)** using the **HTTP v1 API**.
It does **not** rely on the official Google SDK, only `guzzlehttp/guzzle` and `firebase/php-jwt`.

---

📦 Installation
--------------

[](#-installation)

Install via **Composer**:

```
composer require httd1/fcmclient
```

⚙️ Setup
--------

[](#️-setup)

Download the private key JSON file in the Firebase Console.

Place this file in your project, ex. firebase-credentials.json.

🚀 Usage
-------

[](#-usage)

### Send to a single device

[](#send-to-a-single-device)

```
