Firebase Cloud Messaging
Send push notifications to your Android, iOS and web apps through Firebase.
Connect it with: Service account. Firebase Cloud Messaging's own documentation: https://firebase.google.com/docs/cloud-messaging/auth-server.
What agents can do
Connect Firebase Cloud Messaging so the agents working your tasks can reach it. With it connected, they can:
- Send a push notification to one device, by its registration token.
- Send to everyone subscribed to a topic, for example a release announcement.
- Send a data message that your app handles silently.
Before you start
- A Firebase project with your Android, iOS or web app registered under Project settings > General > Your apps.
- Permission to create service account keys in the project (the Firebase Admin or Owner role); some organizations disable key creation by policy.
- For iOS, an APNs authentication key uploaded under Project settings > Cloud Messaging > Apple app configuration.
- A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.
Connect with Firebase Cloud Messaging
Jaah connects to Firebase Cloud Messaging with a service account, not with a sign-in button.
Connect with an API key
Find each value first:
- Service account key: Firebase console > your project > the gear icon > Project settings > Service accounts > Generate new private key > Generate key. Paste the whole downloaded JSON file.
- Project ID (optional): Blank uses the project_id inside the key. Otherwise Firebase console > Project settings > General > Project ID.
Then add it to Jaah:
- In Jaah, open Secrets, select New, and pick the Firebase Cloud Messaging card.
- Name the secret and choose who can use it.
- Fill in Service account key, Project ID.
- Select Save. Jaah tests the secret straight away (see Test the connection).
Jaah encrypts what you type and never shows it again — not to you, and not to an admin.
Use your own OAuth app
Not used: Jaah connects to Firebase Cloud Messaging with a service account, not through an OAuth app.
Test the connection
Select Test on the secret. Jaah makes one read-only call to Firebase Cloud Messaging with the stored values and shows the result on the secret's page. Jaah also tests automatically when you save or reconnect.
Who can use it
Every secret has an owner, and the owner decides who can use it:
- Personal — only your own tasks can use it. This is the default.
- Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
- Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.
More on owners and access: How secrets work.
Use it in an agent session
An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:
org/<name>for an organization secret,projects/<project>/<name>for one attached to a project,me/<name>for your personal one.
A key connection hands the agent its fields: service_account_json, project_id.
Tell the agent in your task description which secret to use, for example “use the Firebase Cloud Messaging secret org/firebase-cloud-messaging”.
Manage, rotate or disconnect
Everything is on the secret's page under Secrets:
- Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Firebase Cloud Messaging once the test passes. Steps: Replace or delete a secret.
- Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Firebase Cloud Messaging's side too, delete the service account's key in its cloud console.
Limitations
- Test proves the key is valid and can be issued an FCM token; the first real send also checks that the Firebase Cloud Messaging API is enabled in the project.
- The key file grants what its service account's roles grant. Use a dedicated service account with the Firebase Cloud Messaging API Admin role rather than the default Admin SDK one.
- The community edition cannot test this connection; agents can still use it.
- Agents can do only what the connected Firebase Cloud Messaging service account and its roles allow.
Troubleshooting
Test says Firebase Cloud Messaging rejected the service account key (400)
The key was deleted or the service account disabled; Google's own reason follows the message. Generate a new private key under Project settings > Service accounts and select Replace on the secret.
Test says the key is not a service account JSON key
Paste the whole downloaded file, from the opening { to the closing }, not only the private_key value.
Sends fail with 403 SERVICE_DISABLED or PERMISSION_DENIED
Enable the Firebase Cloud Messaging API for the project in Google Cloud console > APIs & Services, and give the service account the Firebase Cloud Messaging API Admin role.
Still stuck? Select Test and read the result: it names the value Firebase Cloud Messaging refused and the status it answered.
FAQ
Do I need the legacy server key?
No. Google retired the legacy FCM API and its server keys; this connection uses the HTTP v1 API with a service account.
Can the same key reach other Firebase services?
It can reach whatever its service account's roles allow, but agents receive it as an FCM connection. Use a key with FCM-only roles.
Can Jaah or an admin see the key or token?
No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.
Can I connect more than one Firebase Cloud Messaging account?
Yes. Add one secret per account, each with its own name, and tell the agent which one to use.