lkaybob / php-fcm-v1

Implementation of Firebase Cloud Messaging HTTP v1 API in PHP
https://packagist.org/packages/lkaybob/php-fcm-v1
MIT License
14 stars 17 forks source link
fcm firebase notifications php php-fcm

php-fcm-v1

Build Status codecov Latest Stable Version Total Downloads License

php-fcm-v1 is an PHP implementation of FCM HTTP v1 API

What is different compared to others FCM Libraries?

Most of other libraries are implementation of FCM's Legacy HTTP Server Protocol. It requires a server key from Firebase console (which means you have to copy and paste in your code) (Docs)

HTTP v1 API, in contrast, leverages OAuth2 security model. You need to get an access token (which is valid for about an hour) in order to request sending notification with service account's private key file. Although (See the blog post about HTTP v1 API)

References

How to use

Further Example

Future Works