Deliver mobile push notifications with Firebase Cloud Messaging
To configure mobile push notifications using Firebase Cloud Messaging for your MagicBell project, follow these steps:
- Login to your Firebase account, select your project, and click the ⚙ icon to open Project settings. If you don't have a project yet, create one.
- Click the Cloud Messaging tab, then copy the Server key Token under Cloud Messaging API (Legacy) — you may have to first enable this API.
- From the Settings → Channels page in your dashboard, select Add Provider → Mobile Push → Firebase FCM .
- Enable the provider and complete the required fields (server key token (API key) from step 2 above and your app bundle ID), then click Save.
FCM can also be used to configure mobile push notifications for iOS apps.
Provider Overrides
Our create notifications endpoint allows you to customize the payload sent to the Firebase by setting notification.overrides
.
The notification.overrides.android
parameter accepts all the body parameters of the Firebase API.
Provider-specific parameters in notification.overrides
take precedence over the ones specified in notification
.
Example: Set the notification image
{
"notification": {
"title": "We are processing your order",
"content": "Thank you for your order. We will notify you when these items are ready.
",
"recipients": [
{
"email": "[email protected]"
}
],
"overrides": {
"providers": {
"android": {
"notification": {
"title": "Order status updated",
"body": "Your order is being processed",
"image": "https://example.com/image.png"
}
}
}
}
}
}