- Add the required Firebase config properties on both
firebase-messaging-sw.js
&index.html
- Serve the app over HTTPS (Cloud messaging will not be served over non-secure HTTP)
- Upon granting browser permission to receive notifications, copy the browser token
- Now you're ready to send test message(s) 4.1 Option 1 - using cURL. Or 4.2 Option 2 - From Firebase Console
- Paste the copied browser token to the
curl-test.sh
(Key:DEVICE_REG_TOKEN
) - Get the Server Key from Firebase console & update
SERVER_KEY
- Run
sh curl-test.sh
- Go to Firebase > Cloud Messaging > New notification
- Enter Notification title, Notification text & the notification image (optional - you may use
https://localhost/assest/img/dialog_logo.png
) - Once the details are filled, press
Send test message
- Paste the browser token
- Press
Test