Flutter FCM Rest API ✅

Abdul Rehman
2 min readMar 21, 2021

Check the dart file for FCM Rest API to send the FCM notification to specific devices. Just add the class in your project and call the method to send notification.

Rest API in Postman

You can use this API in Postman using the following link:

https://www.getpostman.com/collections/f088905bad905d88dc32

How to use the FCM Rest API?

final fcmTitle = "Test Title";
final fcmBody = "This is the test body of the FCM.";
final receiverFcmToken = "FCM token of receiver device";
Api().sendFcm(fcmTitle, fcmBody, receiverFcmToken);

You can customize the request body of the Rest API according to your needs. This is the base request to send basic notification to android and IOS devices with default notification sound.

FCM Rest API Documentation : https://firebase.google.com/docs/cloud-messaging/http-server-ref

Thank you and I hope this article helped you in some way. If you like the post please support the article by sharing it.🙏 Have a nice day!😀

I am a freelancer who can help you make your idea up and running ✅. My expertise is in flutter and Android development with 5 years of experience in the industry. You can contact me at my email(abdulrehman0796@gmail.com) for any projects 😊

--

--

Abdul Rehman

Mobile developer in love with Flutter and Android ♥️