Updated 11 January 2024
In this article, you will learn how to send Push Notifications via Firebase by Postman.
You can push notifications from the Firebase console as well as from the Postman using the Firebase Cloud Messaging API.
Before proceeding further you should know how to integrate Push Notification in iOS. So please go through our article on Push Notification in iOS, where we have explained about integrating the Push Notifications using Firebase.
Send Push Notifications via Firebase by Postman requires you to have the Postman application installed on your system.
You will test the notifications either using the device token or topic. The receiving app will have a particular Firebase device token which you can use to send the notification on that device. Also, the receiving application will have subscribed to the topic so that you can send the notification to that topic and will be received by any user that has installed that application.
If you want to send push notifications from your server using the Firebase console, first you can check whether it is working or not in Postman.
The FCM request used to send the notification is https://fcm.googleapis.com/fcm/send, the request type is POST.
Inside the Body of the request use the below JSON containing all the details. Below request will send the notification to a single device.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
{ "data": { "body": "This is awesome notification by Mobikul", "title": "Mobikul", "sound": "default" }, "priority": "high", "time_to_live": 30, "delay_while_idle": true, "content_available": true, "to": "add device_token", "notification": { "body": "This is awesome notification by Mobikul", "title": "Mobikul", "sound": "default" } } |
The authorization key will be your server key which you will get from the Firebase console. For more information check the below image.
Note:-
You can send notifications to multiple users by sending them to a particular topic that your application is subscribed for.
Here is an example how you can achieve that.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
{ "data": { "body": "This is awesome notification by Mobikul", "title": "Mobikul", "sound": "default" }, "priority": "high", "time_to_live": 30, "delay_while_idle": true, "content_available": true, "to": "add the topic here", "notification": { "body": "This is awesome notification by Mobikul", "title": "Mobikul", "sound": "default" } } |
There are multiple ways to push notifications to the user’s device, sending via Firebase using Postman is one of them.
To download the Postman click here.
You may also check ourĀ Flutter app development page.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
It is working fine at my side but in some android devices we are not getting notification.
please resolve my issues.