1

I know how to send push notification with FCM-TOKEN and with TOPIC name via POSTMAN, but I'm not sure about how to send FCM notification with package name or only to the particular package if my firebase project contains more than 2 apps connected.

{ 
 "to": "/topics/global", // global is your topic 
 "notification" : {
 "body" : "great match!",
 "content_available" : true,
 "priority" : "high",
 "title" : "Portugal vs. Denmark"
 },
 "data" : {
 "body" : "great match!",
 "content_available" : true,
 "priority" : "high",
 "title" : "Portugal vs. Denmark"
 }
}
Vishal Naikawadi
  • 419
  • 6
  • 11

1 Answers1

0

Yes, You can send notification from Postman. For this you have to create a JSON like as below

{
 "to" : "YOUR_FCM_TOKEN_WILL_BE_HERE",
 "collapse_key" : "type_a",
 "notification" : {
 "body" : "Body of Your Notification",
 "title": "Title of Your Notification"
},
"data" : {
 "body" : "Body of Your Notification in Data",
 "title": "Title of Your Notification in Title",
 "key_1" : "Value for key_1",
 "key_2" : "Value for key_2"
  }
}

Select POST METHOD Enter request URL as https://fcm.googleapis.com/fcm/send

Add Headers Authorization: key=<server_key>, you will get it from Firebase Cloud messaging tab

And Content-Type: application/json

For for more information check this Link

Hope this will help you.

Sanwal Singh
  • 1,765
  • 3
  • 17
  • 35
  • 1
    I want to send FCM notification to the particular package name not to the unique FCM-Token. – Vishal Naikawadi Jul 20 '19 at 06:34
  • hi @VishalNaikawadi , you can check https://stackoverflow.com/questions/38237559/how-do-you-send-a-firebase-notification-to-all-devices-via-curl – Jay Soni May 26 '21 at 06:18