Skip to main content
Version: 1.3.x

FCM Mobile Push Provider

You can setup Firebase Cloud Messaging (FCM) to send push notification to your user's Android and iOS devices.

Unique Identifier

Each provider is identified by a unique identifier. Unique identifier of FCM provider is fcm

Enabling FCM Push Provider

To enable FCM provider, login to your Engagespot dashboard, goto Channels -> Mobile Push and enable FCM. You'll have to paste the content of your Service Account JSON file, which you can generate from your Firebase Settings. Read Firebase documentation to learn how to generate your Service Account JSON File.

User Profile Requirement

FCM Provider uses the fcm.tokens array in your User's profile to send notifications to them. That means, you should update the fcm.tokens array in your User's profile whenever you generate a Firebase Registration Token in your mobile device.

"fcm": {
"tokens": [

You should use the PATCH or PUT method of the /profile API (Read Docs) to add an FCM token to user's profile.


Please note that, when you create a new User, they won't have the fcm object or fcm.tokens array. You can pass your user's FCM Token via fcm.token property via PUT request. When you add more tokens, we'll keep adding them to fcm.tokens array.


This is how you can attach a new FCM Token to user's profile.

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--data-raw '{

FCM Provider Configurations.

FCM Provider needs only one configuration, that is the SERVICE_ACCOUNT Json.

SERVICE_ACCOUNTContent of the Service Account JSON file created from your Firebase project settings pageYes

The content of your firebase service account json looks like this.

"type": "service_account",
"project_id": "projectda017",
"private_key_id": "e63a83f197bbcd55b36cba7879",
"private_key": "PRIVATE KEY",
"client_email": "",
"client_id": "105673140109646291992",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": ""

Overriding FCM Configuration and Notification Data via API

FCM provider allows you to override all the above configurations and data while sending a notification through Engagespot API, using the endpoint.

To override the configurations, you must supply them via override.fcm parameter of the above API. Within the override parameter, you can supply any object that we'll directly pass to FCM API Body See doc.

By default your Engagespot notification's title, message parameters will be passed to FCM's title, body respectively, and any other paramaters in the data payload.