Member-only story
How to send push notification through curl using Firebase api?
Aug 25, 2021
curl -X “POST” “https://fcm.googleapis.com/fcm/send" \
-H “Authorization: key=<Server key>” \
-H “Content-Type: application/json” \
-d $’{
“notification”: {
“title”: “Product expiry”,
“body”: “Your product washing machine is going to expire on 12–08–2021”,
“badge”: “0”,
“sound”: “default”,
“priority”:10
},
“registration_ids”: [
“<Your device token generated by Firebase>”
]
}’
Not a Premium Medium member? Click here to access it for free!