PHPackages                             mi5ha/firebase-backend-api - 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. mi5ha/firebase-backend-api

AbandonedProject

mi5ha/firebase-backend-api
==========================

Backend API for Firebase

v1.0.3(5y ago)06MITPHPPHP &gt;=7.2.0 &lt;8.0

Since Oct 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mi5ha/firebase-php-backend)[ Packagist](https://packagist.org/packages/mi5ha/firebase-backend-api)[ RSS](/packages/mi5ha-firebase-backend-api/feed)WikiDiscussions master Synced today

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

Firebase PHP Backend
====================

[](#firebase-php-backend)

[![Supported PHP version](https://camo.githubusercontent.com/46057d3b90f000305f20f377a2c03e9b9f80247538c78c23b519209e5c783f9f/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6f676f3d706870266c6162656c3d504850266d6573736167653d253545372e3226636f6c6f723d373737626234)](https://github.com/mi5ha/firebase-php-backend)

Some Firebase functionalities require that you write a server application in order to use them.

This is very simple PHP application that exposes some useful API endpoints that you can use from your mobile or web app.

Table of contents
-----------------

[](#table-of-contents)

- [Overview](#overview)
- [Requirements](#requirements)
- [Installation](#installation)
- [Security warning](#security-warning)
- [API](#api)

Overview
--------

[](#overview)

- For example, sending multiple Notifications from one device to several other devices can not be done without a server app.
- This app uses [Firebase Admin SKD for PHP](https://github.com/kreait/firebase-php) under the hood

Requirements
------------

[](#requirements)

- Minimal PHP version is v7.2
- Apache

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

[](#installation)

### Create new project

[](#create-new-project)

```
composer create-project mi5ha/firebase-backend-api

```

### Configuration

[](#configuration)

- [Download service account key](https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk) file from Firebase
    - Go to "Settings -&gt; Service accounts"
    - First click "Create service account" then "Generate new private key"
- Put service key file somewhere outside document root
- Open `config/config.php`, and add the path to your service key relative to config file

Security Warning
----------------

[](#security-warning)

- Its important that your service account key, i.e. json file you downloaded from Firebase, is not accessible from the net
- If you accidentally put this file inside this project, there is .htaccess that should prevent user accessing it (Apache only)
- At the moment this application doesn't support any kind of API authentication

API
---

[](#api)

With all requests send this header:

```
Content-Type: application/json

```

### sendMulticastMessages

[](#sendmulticastmessages)

Send notifications from one device to multiple other devices.

**Example****POST request**

```
http:///?method=sendMulticastMessages

```

**JSON request body**

```
{
    "title": "I am Iron Man",
    "deviceTokens": [
        "fqORTS66YYQHKnpSsdf0QIKl:APA91bEggEnA-NDaSRvFtHsdd3UQLw3miPSw0jINjrgg0DdaRUP9u2DXBE6Veq2br9qsmDI5q2S-VnA1SvSmBnrOKMCxyuLzhh0EY2YXvQRqrDL5nf5FC8sjjLAgenLm-voggrtjAdlW",
        "f4fRp143affMgijGpVoj5I:APA91bGaaeqJ1IwtTmVvPVahdzeFbffvXizaL1u2iYGqWDhhht0aJuEFDt-qNHHHTgggUGfrM6qcrwKffFz7Sm-2PMsCFfkjjQjcNDbnn_tOcu9AF0OwGX21aaOpbXCUhhGyy4o5Zcr"
    ],
    "imageUrl": "https://i.insider.com/5b52400e51dfbe20008b45f9?width=750&format=jpeg&auto=webp"
}
```

**Success response**

```
{
  "success": true
}
```

**Error response**

```
{
  "success": false,
  "errorMessages": [
    "The registration token is not a valid FCM registration token",
    "The registration token is not a valid FCM registration token"
  ]
}
```

errorMessages is an array of specific error messages for each device token.

**You need to get device tokens to use this method**For example from [React Native Firebase](https://rnfirebase.io) you can get this token with [getToken()](https://rnfirebase.io/reference/messaging#getToken)

```
import messaging from '@react-native-firebase/messaging';

let deviceToken = await messaging().getToken();

```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

Firebase PHP Backend is licensed under the [MIT License](LICENSE).

Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~0 days

Total

3

Last Release

2036d ago

### Community

Maintainers

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

---

Top Contributors

[![mi5ha](https://avatars.githubusercontent.com/u/1238203?v=4)](https://github.com/mi5ha "mi5ha (14 commits)")

---

Tags

notificationsfirebasefirebase admin sdk

### Embed Badge

![Health badge](/badges/mi5ha-firebase-backend-api/health.svg)

```
[![Health](https://phpackages.com/badges/mi5ha-firebase-backend-api/health.svg)](https://phpackages.com/packages/mi5ha-firebase-backend-api)
```

###  Alternatives

[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[kreait/firebase-bundle

Symfony Bundle for the Firebase Admin SDK

1534.7M2](/packages/kreait-firebase-bundle)[paragraph1/php-fcm

PHP application server for google firebase cloud messaging (FCM)

1991.2M10](/packages/paragraph1-php-fcm)[benwilkins/laravel-fcm-notification

Laravel FCM (Firebase Cloud Messaging) Notification Channel

210964.1k1](/packages/benwilkins-laravel-fcm-notification)[edwinhoksberg/php-fcm

A library for sending Firebase cloud messages and managing user topic subscriptions, device groups and devices.

68328.5k1](/packages/edwinhoksberg-php-fcm)[redjanym/php-firebase-cloud-messaging

PHP SDK for Firebase Cloud Messaging from Google

39847.9k1](/packages/redjanym-php-firebase-cloud-messaging)

PHPackages © 2026

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