Sending Push via Postman using Firebase Messaging
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.
Open Postman, click on Enter request URL
textbox, enter firebase url
https://fcm.googleapis.com/fcm/send
Than change request type to POST
. See below screenshot:
Now to click on Header and add two params
Content-Type
and Authorization
.
Content-Type= application/json
Authorization=AIzaSyAEb3NhsfGw1ih5mn8cmrGUAXMp86waQ //FCM SERVER KEY
See below screenshot:
Now click on Body
than select Row
and add value as object like below
{
"to":"eB5papU2Xdc:APA91bFFvc3dXru1fN5JY8U19oHIpfGhPUx7Ll7v9vJYTsIGZ15mDwB2Wpep3flLK85IUqqs2WqJwjYHSDYX28oJ1wTP0R2TDc2ba_uVjUauDcp3pCNKr_0KlghOnS",
"notification" : {
"body" : "New announcement assigned",
"OrganizationId":"2",
"content_available" : true,
"priority" : "high",
"subtitle":"Elementary School",
"Title":"hello"
},
"data" : {
"priority" : "high",
"sound":"app_sound.wav",
"content_available" : true,
"bodyText" : "New Announcement assigned",
"organization" :"Elementary school"
}
}
Now your Postman would look like this. Click Send button at top right.
Good luck!