Created
May 6, 2022 14:44
-
-
Save ssniks/0f83efa33eba4969bd78f0073e0c73c0 to your computer and use it in GitHub Desktop.
Sending push notification by fcm api
This file contains 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 --location --request POST 'https://fcm.googleapis.com/fcm/send' \ | |
--header 'Authorization: key=XXX' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"notification" : { | |
"title": "Title of Your Notification", | |
"body" : "Body of Your Notification" | |
}, | |
"data": { | |
"custom_key": "XXXX" | |
}, | |
"priority": "HIGH", | |
"time_to_live": 3600, | |
"to": "user_device_token" | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment