pablocattaneo
12/2/2017 - 2:19 PM

Send Firebase Cloud Notification using Curl

Send Firebase Cloud Notification using Curl. #firebase-cloud-messaging #FCM #curl

Source: https://stackoverflow.com/questions/37371990/how-can-i-send-a-firebase-cloud-messaging-notification-without-use-the-firebase

curl -X POST --header "Authorization: key=[API_ACCESS_KEY]" \
    --Header "Content-Type: application/json" \
    https://fcm.googleapis.com/fcm/send \
    -d "{\"to\":\"[YOUR_DEVICE_ID_TOKEN]\",\"notification\":{\"body\":\"Yellow\"},\"priority\":10}"

#Where API_ACCESS_KEY is the Server key of Cloud Messagin https://console.firebase.google.com/project/[proyectNameID]/settings/cloudmessaging/
#Where YOUR_DEVICE_ID_TOKEN is the user FCM Token