Skip to content

Instantly share code, notes, and snippets.

@behzadcym
Created January 10, 2021 11:29
Show Gist options
  • Save behzadcym/27632d623b5705b1cd14bf8c090ae5c9 to your computer and use it in GitHub Desktop.
Save behzadcym/27632d623b5705b1cd14bf8c090ae5c9 to your computer and use it in GitHub Desktop.
send fcm notification using curl in terminal
DATA='{"priority": "high","notification":{"color":"#B4A06A","sound":"SOUND_IN_RAW_DIRECTORY","android_channel_id" : "CHANNEL_NAME","title": "TITLE"}, "data": {}, "to": "USER_FCM_TOKEN"}'
curl https://fcm.googleapis.com/fcm/send -H "Content-Type:application/json" -X POST -d "$DATA" -H "Authorization: key=SERVER_API_KEY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment