I\'m trying to use Postman to send a single Push Notification using Firebase
Cloud Messaging service.
This is a working cURL
command for th
The correct way to set up Authorization
key at Header is
key=<API_ACCESS_KEY>
and not only
<API_ACCESS_KEY>
Silly mistake, but since this could be useful for someone for testing Firebase Messaging with Postman I'm leaving the question opened.
Posting FCM through POSTMAN
Body - to is token id (should be generated through instance token) write body in raw binary application/json
{
"to": "cpa8cZPjq-w:APA91bF122f1Rnhu9v47bL
YMajaNTHAIU5SzItDwTy9o2MCIveG0PlK78VPvp3d
CqjwnUKZ4
ngi1trSyM3_aXttW62iknFfbPGtjRLhZr6wq-3qFdboz8gzdOGPz**********",
"notification": {
"body": "Hello",
"title": "This is test message."
}
}
header: should have authorization :server key
Content type : application/json after posting here the success message:
Look at below screenshot how Authorization key is set
Authorization : **key=**abcdefghijklmnopr2qrst253uv124wxyz_9shg
Steps to send FCM throw Postman:
More information here: https://stackoverflow.com/a/62670409/1151916
Be sure to include the content-type : application/json header
it fails with a misleading error if you don't include the content-type header saying: Error=MissingRegistration