LoginSignup
2
2

More than 3 years have passed since last update.

Firebase Cloud Messaging(FCM)のtokenをcurlで検証

Posted at

fcmのレガシーHTTPプロトコルで URLパラメータに dry_run=true 指定すれば、下記curlで検証できた。レガシーHTTPプロトコルが有効な間はこれで手軽に確認できるはず...!

$ curl -H "Content-Type: application/json" -H "Authorization: key=$FCM_API_KEY" "https://fcm.googleapis.com/fcm/send?dry_run=true" -d '{"registration_ids":["$FCMTOKEN"]}'
結果
{"multicast_id":-1,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"fake_message_id"}]}
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2