# Push (https://www.getfounderhq.com/docs/sequences/push)

Connect Firebase Cloud Messaging so sequence push steps reach your app.
About 5 minutes.

<Callout type="info" title="Before you start">
You need a Firebase project with your app registered, and a service account
in that project. Your contacts also need a device push token stored on them
in FounderHQ — that token is what a push step sends to. Then open Sequences
in FounderHQ and add a push connection.
</Callout>

## Connect Firebase

**Paste:** the whole service-account JSON file. In the Firebase console,
open Project settings → Service accounts and generate a new private key.
Paste the file's full contents, not just one field out of it.

FounderHQ stores it encrypted and uses it to mint short-lived access
tokens. It never appears in any request you can inspect.

That is the entire setup. FCM covers both iOS and Android for a Firebase
app, so one connection serves both.

## What a push message carries

A push template renders a title and a body. Both are required — a push with
either one empty fails before it leaves FounderHQ.

FounderHQ also attaches its own message ID to the notification's data
payload, under `fhqOutboundMessageId`. Your app can read it and report
delivered or opened back through the FounderHQ events SDK. If your template
sets its own data values, FounderHQ's key is added after them, so your data
can never overwrite it.

## What you can and cannot see

FCM tells you it accepted the message. It does not tell you the phone
showed it. Push messages in FounderHQ stay at Sent, and a sequence step
cannot wait on "delivered" over push.

If you want that signal, report it from your app: read
`fhqOutboundMessageId` when the notification arrives or is tapped, and send
an event with it.

A dead device token — the app was uninstalled, or the token expired — fails
permanently and is not retried.

## Verify

1. Build a sequence with one push step and run a contact with a live device
   token through it.
2. The notification appears on the device with the title and body from your
   template.
3. Open the sequence in FounderHQ. The message shows as Sent.

## Troubleshoot

### The send fails saying the service account is invalid

The pasted value is not the service-account JSON. Paste the whole file. It
must contain `project_id`, `client_email`, and `private_key`.

### The send fails saying the payload is missing title or body

The push template renders one of them empty. Check the variables it uses
against the contact you are sending to.

### One contact always fails while others work

That device token is dead. The app was removed, or the token rotated. Get a
fresh token from the device and store it on the contact.
