Skip to content

Instantly share code, notes, and snippets.

@smd877
Created July 4, 2019 04:14
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 smd877/ebfbd1c1884bbe259a04fe806a906b92 to your computer and use it in GitHub Desktop.
Save smd877/ebfbd1c1884bbe259a04fe806a906b92 to your computer and use it in GitHub Desktop.
export AUTH_KEY=ここにクラウドメッセージングタブのサーバーキーを入力
export SEND_TO=ここにブラウザで取得したInstance ID Tokenを入力
curl -X POST -H "Authorization: key=$AUTH_KEY" -H "Content-Type: application/json" -d '{ "notification": { "title": "This is Title!!!", "body": "Body Body Body.", "icon": "firebase-logo.png" }, "to": "'$SEND_TO'" }' "https://fcm.googleapis.com/fcm/send"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment