Skip to content

Instantly share code, notes, and snippets.

@judeebene
Created November 25, 2016 19:03
Show Gist options
  • Save judeebene/afc45d01cb1d146e312b097051d4fa80 to your computer and use it in GitHub Desktop.
Save judeebene/afc45d01cb1d146e312b097051d4fa80 to your computer and use it in GitHub Desktop.
// use for testing and debug FCM
FCM_SERVER_KEY=""
BODY=$(cat <<END
{ "data": {
"place_category": "hairdressers",
"place_id":"-KWq4IDMf0ypm0UF3T9W"
},
"to" : "/topics/user_rDV4akEdW2OiV4ziailFf2meQFI3",
}
END
)
curl \
--header "Authorization: key=${FCM_SERVER_KEY}" \
--header "Content-Type: application/json" \
https://fcm.googleapis.com/fcm/send \
--data-ascii "${BODY}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment