Firebase Cloud Messaging
APISend push notifications to devices and topics from your server
- Access
- OAuth 2.0 access token
About
Firebase Cloud Messaging sends notification and data messages to registered app devices or topics. The HTTP v1 API accepts a short-lived OAuth 2.0 access token; Firebase Admin SDKs can handle authentication and message construction on trusted servers.
What you can do with it
- Send a push notification to a device registration token
- Broadcast a message to devices subscribed to a topic
- Send platform-specific notification or data payloads
Get started
- Create a Firebase project and enable the Cloud Messaging API
- Obtain a device registration token in your app
- Generate a service account OAuth access token on a trusted server
Example
curl -X POST "https://fcm.googleapis.com/v1/projects/$FIREBASE_PROJECT_ID/messages:send" \
-H "Authorization: Bearer $FCM_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message":{"token":"DEVICE_REGISTRATION_TOKEN","notification":{"title":"Hello","body":"New update"}}}'Details
- Hosting
- Hosted service
- Available in
- Worldwide
- Official SDKs
- JavaScript/TypeScript, Python, Java, Go, C#
- MCP server
- Local
- Works with
- Google Cloud