peter.sh icon indicating copy to clipboard operation
peter.sh copied to clipboard

Any example with FCM?

Open gibigate opened this issue 6 years ago • 2 comments

gibigate avatar Apr 01 '19 07:04 gibigate

What do you mean by FCM? https://tests.peter.sh/push-message-generator/ can already send messages to FCM, also using the older proprietary mechanism (select that under authentication).

beverloo avatar Apr 01 '19 12:04 beverloo

@gibigate

See https://web-push-book.gauntface.com/faq/#what-is-the-deal-with-gcm-fcm-web-push-and-chrome.

TL;DR: Firebase Cloud Messaging is not a Web Push API, it's another proprietary API. It uses Firebase Cloud Messaging JavaScript SDK, different tokens, different headers, but the same https://fcm.googleapis.com/fcm/send endpoint, and can send push notifications to native Android and iOS apps, not only to web apps.

See https://github.com/firebase/quickstart-js/tree/master/messaging for the demo.

FluorescentHallucinogen avatar Jul 28 '22 13:07 FluorescentHallucinogen