Firebase Credentials

Generate the Firebase Service Account JSON that lets notifySphere send push notifications through FCM.

Overview#

notifySphere sends push through Firebase Cloud Messaging (FCM). It needs one Firebase Service Account JSON file from your Firebase project, and that one file covers both Android and iOS. This guide shows how to get it.

Before you start: add your apps to Firebase#

In your Firebase project, register each platform your app runs on:

  • Android: add an Android app with your package name, then download google-services.json into android/app/.
  • iOS: add an Apple app with your bundle ID, then add GoogleService-Info.plist to your Xcode project. Also upload your APNs authentication key (.p8) under Project settings → Cloud Messaging, or iOS devices won't receive anything.

These two files go in your app. The Service Account JSON below is a different file, and it goes to notifySphere.

Generate and upload the key#

  1. Access Firebase Console

    Go to the Firebase Console and select your project, or create a new one if you haven't already.

  2. Open Project settings

    Click the settings (gear) icon next to "Project Overview" in the left sidebar and select Project settings.

  3. Open the Service accounts tab

    In Project settings, click the Service accounts tab. The Firebase Admin SDK section is selected.

  4. Generate a new private key

    Under Firebase Admin SDK, click Generate new private key. A dialog warns you to keep the key confidential; click Generate key to download the JSON file.

  5. Verify the JSON file contents

    Your downloaded JSON file should contain the following fields:

    FieldTypeDescription
    typestringShould be service_account
    project_idstringYour Firebase project ID
    private_key_idstringUnique identifier for the private key
    private_keystringThe actual private key (begins with -----BEGIN PRIVATE KEY-----)
    client_emailstringService account email address
    client_idstringClient identifier
    auth_uristringAuthentication URI
    token_uristringToken URI
    auth_provider_x509_cert_urlstringCertificate URL
    client_x509_cert_urlstringClient certificate URL
  6. Upload to notifySphere

    Once you have your Service Account JSON file:

    1. In the dashboard, open Setting → Platform → Android (FCM) Settings and go to the upload step (see Push Setup).
    2. Click the Service Account JSON file upload field and select your file.
    3. The Firebase Project ID is extracted automatically and displayed.
    4. Click Save & Continue to proceed.

Troubleshooting#

Invalid JSON file error#

Make sure you're uploading the correct JSON file. The file should be named something like your-project-name-firebase-adminsdk-xxxxx.json.

Missing required fields#

If you receive an error about missing fields, try generating a new service account key from the Firebase Console.

Additional resources#

Stuck or something unclear? Contact us and we'll help.