Last active
December 9, 2019 04:50
-
-
Save moehandi/60640257685f0ca96767df7340b87131 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H "Content-type:on:key=<SERVER KEY in Cloud Message Setting Tab on Firebase Console>" -X POST -d | |
'{ "to": "/topics/topic-name", | |
"notification": { | |
"title": "notification title", | |
"text" : "notification text" | |
"click_action" : "action or activity name to open intent" | |
}, | |
"data": { | |
"message": "this data message", | |
"title" : "this data message title", | |
"body" : "this data message body" | |
} | |
}' https://fcm.googleapis.com/fcm/send | |
//______________________________________________________________________________ | |
curl https://fcm.googleapis.com/fcm/send -X POST \ | |
— header “Authorization: key=your_firebase’s_server_auth_key” \ | |
— Header “Content-Type: application/json” \ | |
-d ' | |
{ | |
“to”: “the_device_token” | |
“notification”:{ | |
“title”:”Notification Test”, | |
“body”:”Notification Test Body Message” | |
}, | |
“priority”:10 | |
}' | |
//______________________________________________________________________________ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment