> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/cloud/push/integrations/providers/fcm.md).

# Firebase Cloud Messaging

Connect Firebase Cloud Messaging as a Push integration provider.

> Deliver push notifications to Android apps — and to anything else Firebase can reach — at no cost.

*Last updated 2026-09-11 · Applies to any project with the Push module enabled*

## Why it exists

Google delivers to Android devices through Firebase. Firebase in turn trusts a **service account**: a robot user inside your Firebase project whose credentials are a JSON file. Give Norbix that file and it can ask Firebase to deliver on your behalf.

## When you'd use it

* Your Android app notifies a customer that their order has shipped.
* A cross-platform app built with Flutter or React Native uses one Firebase project for all its builds.
* You keep a separate Firebase project, and a separate integration, for staging.

## Where to find it

Push → Integrations → **Add New Integration** → Firebase Cloud Messaging · `/projects/<project>/push/integrations/new/fcm`

## Before you start

Requires a role that carries `…:notifications:push:settings:manage` — normally **Owner** or **Admin**. Collect these first:

* A Firebase project.
* A **service account** key: Project settings, then Service accounts, then *Generate new private key* — this downloads a JSON file.
* From that file you need the **project id**, the **client email** and the JSON itself.

## How to connect it

1. Open **Push → Integrations → Add New Integration** and pick **Firebase Cloud Messaging**.
2. Fill the fields below. Create and edit use the same form; editing loads the saved values, but secrets are never shown back.
3. Click **Create**.
4. Open the saved integration and choose **Set as default** if this provider should be used when a template names none. Defaults are per environment.
5. Choose **Test**. One real notification is sent; confirm you received it with **I received the push** so the test is recorded as passed.

**What "working" looks like:** the integration is listed as **Enabled**, carries the **Default for \<environment>** badge if you set it, and its last test is recorded as successful.

## Fields

| Field                            | What it means                                    | Example                                                     |
| -------------------------------- | ------------------------------------------------ | ----------------------------------------------------------- |
| **Integration Name**             | The name in your integrations list.              | `Android production`                                        |
| **Firebase Project Id**          | The Firebase project that owns the app.          | `my-firebase-project`                                       |
| **Service Account Client Email** | The robot account's address, from the JSON file. | `firebase-adminsdk-xxxx@my-project.iam.gserviceaccount.com` |
| **Service Account JSON**         | The whole downloaded key file, pasted in.        | the contents of `my-project-firebase-adminsdk.json`         |

## Good to know

* The service account JSON is a full credential. Anyone holding it can send notifications as your app — treat it like a password and rotate it if it leaks.
* The three fields must come from the **same** JSON file. Mixing a project id from one Firebase project with a key from another fails at send time, not at save time.
* Firebase can also deliver to web and iOS. If you already route iOS through APNs, do not also target it here or users get the message twice.
* Deleting the key in the Firebase console breaks this integration immediately, but the integration keeps looking healthy in the list until the next send.

## Do it in code

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
await norbix.hub.notifications.savePushIntegration({
  projectId: '<your-project-id>',
  integration: {
    provider: 'AndroidFirebase',
    integrationName: 'Android production',
    projectId: 'my-firebase-project',
    clientEmail: 'firebase-adminsdk-xxxx@my-project.iam.gserviceaccount.com',
    serviceAccountJson: '<the contents of the downloaded json file>',
  },
});
```

{% endtab %}

{% tab title="Python" %}

```python
norbix.notifications.save_push_integration(
    projectId="<your-project-id>",
    integration={"provider": "AndroidFirebase", "integrationName": "Android production"},
)
```

{% endtab %}

{% tab title="Go" %}

```go
var out map[string]any
err := c.Hub.Notifications.SavePushIntegration(ctx, map[string]any{
	"projectId":   "<your-project-id>",
	"integration": map[string]any{"provider": "AndroidFirebase", "integrationName": "Android production"},
}, &out)
```

{% endtab %}

{% tab title=".NET" %}
Not available yet — the .NET SDK has no push client methods. Call the REST endpoint below.
{% endtab %}
{% endtabs %}

The Python and Go snippets are shortened — the remaining credential fields are the same keys shown in the TypeScript one and in the table above.

Reference: [Save Push Integration](/sdks-and-cli/notifications/push/save-push-integration.md) · [Test](/sdks-and-cli/notifications/push/test-push-integration.md) · [Set as default](/sdks-and-cli/notifications/push/set-push-integration-as-default.md) CLI: no integration commands today.

## API reference

Endpoints: [Save Push Integration](/api-reference/notifications/push/save-push-integration.md), [Test Push Integration](/api-reference/notifications/push/test-push-integration.md), [Confirm human delivery](/api-reference/notifications/push/confirm-push-integration-human-delivery.md), [Push](/api-reference/notifications/push.md).

## Related

[Providers](/cloud/push/integrations/providers.md) · [Integrations](/cloud/push/integrations.md) · [Templates](/cloud/push/templates.md)
