Firebase Cloud Messaging
Google's free cross-platform push notification service. Supports iOS, Android, and web push notifications. Completely free with no monthly limits — ideal when you need reliable push without third-party costs.
Why Firebase Cloud Messaging?
Mobile app (iOS/Android) push notifications at zero cost
Already using Firebase/Google Cloud — FCM is natively integrated
Web push alongside mobile push from a single API
Signal Breakdown
What drives the Trust Score
Download Trend
Last 12 months
Tradeoffs & Caveats
Know before you commitNeed rich multi-channel messaging (email, SMS, in-app) — OneSignal or Novu are all-in-one
No Google vendor lock-in policy — FCM ties you to Google infrastructure
Need advanced segmentation/analytics on notifications — Braze or OneSignal are more capable
Pricing
Free tier & paid plans
Completely free — no limits on FCM messages
N/A
FCM itself is free; Firebase platform has quotas for other services
Alternative Tools
Other options worth considering
Open-source notification infrastructure for developers. Unify in-app, email, SMS, push, and Slack notifications with a single API, workflow engine, and self-hostable dashboard.
Often Used Together
Complementary tools that pair well with Firebase Cloud Messaging
Learning Resources
Docs, videos, tutorials, and courses
Get Started
Repository and installation options
View on GitHub
github.com/firebase/firebase-admin-node
npm install firebase-adminpip install firebase-adminQuick Start
Copy and adapt to get going fast
import { initializeApp, cert } from 'firebase-admin/app';
import { getMessaging, Message } from 'firebase-admin/messaging';
initializeApp({ credential: cert(JSON.parse(process.env.FIREBASE_SERVICE_ACCOUNT!)) });
const messaging = getMessaging();
async function sendToTopic(topic: string, title: string, body: string) {
const message: Message = {
notification: { title, body },
topic,
};
return messaging.send(message);
}
await sendToTopic('news', 'Breaking news', 'Check the latest updates!');Code Examples
Common usage patterns
Send to multiple devices
Batch-send notifications to up to 500 device tokens
import { getMessaging, MulticastMessage } from 'firebase-admin/messaging';
const messaging = getMessaging();
const message: MulticastMessage = {
notification: {
title: 'Flash Sale!',
body: '50% off all items for the next 2 hours',
imageUrl: 'https://example.com/sale-banner.jpg',
},
data: {
saleId: 'FLASH_50',
expiresAt: new Date(Date.now() + 2 * 60 * 60 * 1000).toISOString(),
},
tokens: deviceTokens, // array of FCM tokens (max 500)
};
const response = await messaging.sendEachForMulticast(message);
console.log(`${response.successCount} sent, ${response.failureCount} failed`);Topic-based broadcast
Subscribe users to topics and broadcast messages
import { getMessaging } from 'firebase-admin/messaging';
const messaging = getMessaging();
// Subscribe a device to a topic
await messaging.subscribeToTopic(['user_device_token'], 'sports-news');
// Send to all subscribers of the topic
await messaging.send({
notification: {
title: 'Goal!',
body: 'Your team just scored!',
},
topic: 'sports-news',
});Community Notes
Real experiences from developers who've used this tool