N/A
Warning: Please ensure your system is NOT in DO NOT DISTURB mode, otherwise you will not receive notifications.
Hint: To send a data message, change the payload key from "notification" to "data" in API Explorer.
Use the following commands in your terminal (requires Python, pip install -r requirements.txt, and serviceAccountKey.json):
.venv/bin/python3 manage_topics.py subscribe <YOUR_FCM_TOKEN> testTopicWeb
.venv/bin/python3 manage_topics.py unsubscribe <YOUR_FCM_TOKEN> testTopicWeb
The Firebase project config in use:
const firebaseConfig = { apiKey: "AIzaSyBB8eAX7O4UzwCYWIQuwuP_0zn-hgzkQ_w", authDomain: "leojay-test-d4715.firebaseapp.com", projectId: "leojay-test-d4715", storageBucket: "leojay-test-d4715.firebasestorage.app", messagingSenderId: "73320501202", appId: "1:73320501202:web:f80a39108d8a020df9020b", measurementId: "G-W0XQNBM1FP" // Optional };
index.html
[Foreground]
firebase-messaging-sw.js
Received a background message at ...
payload.notification.title