How to Configure FCM Authentication for Receiving Push Notifications?

Problem

Push notifications from the MoEngage dashboard are not received on Android devices due to a sender ID mismatch.

Instructions

Perform the following steps to configure Firebase Cloud Messaging (FCM) authentication:

  1. Open the Firebase console and go to the Projects settings section.
  2. On the Service accounts tab, click Generate new private key to download the private key in JSON format, regardless of the selected language.generate new private key.png
  3. Open the downloaded private key JSON file and verify that the project_id matches the one in your google-services.json file in the root directory of your Android project.project id google services.pngproject id.png
  4. On the left navigation menu in the MoEngage dashboard, go to Settings > Channels > Push.
  5. On the Push page, click the App push tab, and then click Android (FCM) tab.
  6. Click Private key file (Recommended).
  7. Use the Choose file button to upload the private key JSON file and click Save.  choose file.png
    Now you will see the request body of the report call with the push_id in the Logcat window of your integrated development environment (IDE), registering the device and project on the MoEngage dashboard.
    register.png
  8. In the MoEngage dashboard, navigate to User Profile > User Info > Reachability > Push. A green tick mark will confirm that the Android device can receive push notifications.push reachability edited.png
  9. Click TEST PUSH. You will see the STATUS : SENT indicating that the device was reachable and the notification was received.test push edited.png

     

    test push 2.png

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?