Last active
May 30, 2018 11:00
-
-
Save kennethlynne/022d297dc2a8e7134aa0ff03e541a07e to your computer and use it in GitHub Desktop.
Create push notifications through FCM from the command line with curl
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 --request POST \ | |
| --header 'Content-type: application/json' \ | |
| --header 'Authorization: key=<server key>' \ | |
| --data ' | |
| { | |
| "to":"<receiver token>", | |
| "notification": { | |
| "title":"Title of your notification", | |
| "body":"content of your notification" | |
| }, | |
| "data": {} | |
| }' \ | |
| https://fcm.googleapis.com/fcm/send |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment