Skip to content

Instantly share code, notes, and snippets.

@ssniks
Created May 6, 2022 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssniks/0f83efa33eba4969bd78f0073e0c73c0 to your computer and use it in GitHub Desktop.
Save ssniks/0f83efa33eba4969bd78f0073e0c73c0 to your computer and use it in GitHub Desktop.
Sending push notification by fcm api
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