Google Firebase

Google Firebase is used for notifications in mobile apps and websites.

WARNING:

By June 18, 2024, you must:

  1. Update from legacy FCM APIs to FCM HTTP v1 API (web push and mobile push).
  2. Add FCM Registration API settings even if you migrated to HTTP v1 API in the past (web push only).

To update, follow the instructions in “Updating to latest version of Firebase APIs”.

If you don’t update to HTTP v1 API, push messages will stop working entirely.
If you don’t enter the new Registration API settings, tokens can’t be refreshed or generated and deliverability will drop gradually.

The process doesn’t require any updates to how you use our Mobile and Web SDKs.

Important: From May 15, 2024, tokens which are inactive for 270 days become expired. More information is available in Google Firebase documentation.

Requirements


  • Create a Firebase project.
  • Enable FCM Registration API for your project.
  • If you want to use push encryption, you must implement decryption in your mobile applications. Client apps without decryption implemented will not receive push messages at all. See the following articles:

Collecting integration parameters from Firebase


  1. Go to Firebase Console website.
  2. Go to Project Settings.
    Result: You are redirected to the General tab.
  3. Copy the value of Project ID and save it in a text editor.
  4. If you want to use web push:
    1. On the General tab, scroll down to the Your apps section.
    2. If you don’t have a Web app, create one:
      1. Click Add app and then </>
      2. Enter a name for your app.
      3. Leave Also set up Firebase Hosting for this app unselected (default).
        Synerise doesn’t require Firebase Hosting. You can enable it if your other integrations require that.
      4. Click Register App and wait until the app is registered.
        Result: The app is created. You don’t need to integrate the displayed SDK code. Synerise handles the integration after you configure the integration, as described in the next steps.
      5. Click Continue to console.
    3. Click the Web app.
    4. From the code snippet shown in SDK set up and configuration, copy the following values into a text editor:
      • apiKey
      • appId
        The values to copy
        The values to copy
  5. Go to the Cloud Messaging tab.
    1. Copy the value of Sender ID and save it in a text editor.
  6. Go to the Service accounts tab.
    1. Click Generate new private key.
    2. Confirm with Generate key and wait a few seconds.
    3. Save the key.
      Depending on your browser and settings, the key may open in a window or be saved as a JSON file.
      Save the entire contents (all properties).
  7. Proceed to Enabling Firebase in Synerise.

Enabling Firebase in Synerise


  1. [Collect integration parameters from Firebase](Collecting integration parameters from Firebase).
  2. Go to Settings iconSettings > Apps & Services.
  3. In the list of integrations, next to Firebase, click Show.
    Result: A list of existing Firebase connections opens.
  4. Click Add connection.
  5. Under Connection with Firebase, switch the toggle on.
  6. In the Connection name field, enter the name of the connection.
    It will be available only on the list of Firebase connections in Synerise.
  7. Select the channel for which you are enabling integration:
  1. Fill in the following fields, using the data you retrieved in Collecting integration parameters from Firebase:
    • Sender ID
      This field is required.
    • Project ID
      This is required to send notifications. If you haven’t copied it earlier in the process, you can find it in your Firebase Console project settings on the General tab.
    • Private key
      Private key is required to create authentication tokens. In this field , you must paste the entire JSON file you downloaded when Collecting integration parameters from Firebase.
  2. Click Apply.

Enabling push encryption

WARNING:
  • When you enable encryption, web push agreements of all Profiles are changed to false. You must collect new web push agreements.
  • When push encryption is enabled, it becomes active both for web push and mobile push. You must enable decryption is in your mobile application.
  1. Web push only:

    1. In Firebase Console, open the project settings.
    2. Go to the Cloud Messaging tab.
    3. Retrieve the encryption keys:
      1. Scroll down to Web configuration.
      2. In Web Push certificates, create or retrieve a key pair.
        To access the private key, you may need the Owner role in the Firebase project.
        Cloud Messaging section
        Cloud Messaging section
      3. Save the key pair in a text editor.
        Tip: In Synerise, these keys are called VAPID keys.
  2. In Synerise, go to Settings iconSettings > Apps & Services.

  3. In the list of integrations, next to Firebase, click Show.
    Result: A list of existing Firebase connections opens.

  4. On the connection you want to update, click Three dots icon > Edit.

  5. Perform the following actions:

    WARNING: The setting applies both to mobile and web push. You must implement mobile push decryption!

    1. Switch on the Push encryption toggle.
    2. Web push only: Fill in the following fields:
      WARNING: If you do not provide the keys, web push messages won’t be sent at all.
      1. Public VAPID key
        If you haven’t copied it earlier in the process, you can find it in your Firebase account settings, on the Cloud Messaging tab, under Web push certificates. To access the private key, you may need the Owner role in the Firebase project.
      2. Private VAPID key
        If you haven’t copied it earlier in the process, you can find it in your Firebase account settings, on the Cloud Messaging tab, under Web push certificates. To access the private key, you may need the Owner role in the Firebase project.
  6. Click Apply.

Updating to latest version of Firebase APIs

You must update the connection settings with new fields required by Firebase API updates.

  1. Ensure that FCM Registration API is enabled for your project.
  2. Go to Settings iconSettings > Apps & Services.
  3. In the list of integrations, next to Firebase, click Show.
    Result: A list of existing Firebase connections opens.
  4. On the connection you want to update, click Three dots icon > Edit.
  5. Select your migration path:

Firebase API v1 already enabled

Follow the instructions depending on the channels you use:

Firebase API v1 is already enabled. You don’t need to do anything.

Full update required

Follow the instructions depending on the push channels you use:

You must enter the Firebase API v1 parameters.

  1. Go to the Firebase Console website.
  2. Go to Project settings.
  3. From the General tab, copy Project ID into a text editor.
  4. Go to the Service accounts tab.
    1. Click Generate new private key.
    2. Confirm with Generate key and wait a few seconds.
    3. Save the key.
      Depending on your browser and settings, the key may open in a window or be saved as a JSON file.
      Save the entire contents (all properties).
  5. Return to integration settings in Synerise.
  6. Paste the project ID into the Project ID field.
  7. Paste the private key (entire JSON) into the Private key field.
  8. Click Apply.
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker