Migrate from FCM Legacy API to HTTP V1 API

Have more questions? Submit a request

As you may know, Firebase Cloud Messaging (FCM) is ending support for their older API by June 2024, and they've recommended that all users switch to the newer HTTP v1 API before then. This change is crucial to ensure the reliability and functionality of push notifications for your mobile and web applications. Firebase explains that, in addition to ongoing support and new features, the HTTP v1 API offers better security through access tokens and is more adaptable and future-proof for upcoming client platform versions compared to the older APIs.

The FCM legacy APIs used the “Server key” for authenticating server-to-server requests. That has now been replaced with Google service accounts.

How does it affect Apps using CometChat?

Starting June 20, 2024, Push notifications will stop working for your apps if the CometChat Push notifications extension doesn’t have the updated Google Service account. To resolve this, you need to follow the below steps:

1) Generate a private key file for your service account:

 

1st new.png

 

  1. In the Firebase console, open Settings > Service Accounts.
  2. Click Generate New Private Key, then confirm by clicking Generate Key.
  3. Securely store the JSON file containing the key.

2) Upload the JSON file to the Push Notification extension’s settings:

2nd new image.png

  1. On the CometChat dashboard, select your app.
  2. Go to the Extensions section and open the settings for the Push Notifications extension.
  3. Upload the previously downloaded JSON file containing the key.
  4. Click on save to update the settings.

No changes are required in your front-end applications.

Articles in this section

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

Comments

0 comments

Please sign in to leave a comment.