Skip to main content
Technical Preview

Overview

A client-mode connector for a curated messaging slice of the Firebase Cloud Messaging HTTP v1 API: Default BASE_ADDRESS is https://fcm.googleapis.com. Topics use messaging/fcm/<object>/<verb>.
Auth is OAuth 2.0 Bearer from a Google service account with scope https://www.googleapis.com/auth/firebase.messaging. Prefer Hub secrets FCM_ACCESS_TOKEN and project id FCM_PROJECT_ID (alias FIREBASE_PROJECT_ID). Status remains blocked until an authenticated live smoke succeeds.

Basic Syntax

Events

Auth

  1. Create a Firebase / Google Cloud service account with permission to use FCM (scope https://www.googleapis.com/auth/firebase.messaging).
  2. Exchange a signed JWT for a short-lived access token at https://oauth2.googleapis.com/token (or use Application Default Credentials / gcloud offline). Store the token in Hub as FCM_ACCESS_TOKEN.
  3. Set connector BASE_ADDRESS to https://fcm.googleapis.com.
  4. Pass access_token and project_id on MQTT JSON payloads so the Authorization header and path resolve. Put the FCM message object (and optional validateOnly) in the same JSON — {payload} is the HTTP body.
  5. Never commit service-account JSON, GOOGLE_APPLICATION_CREDENTIALS files, or live tokens.
  6. Successful send returns HTTP 200 with a Message including name. Use validateOnly: true for dry-run smokes.

Example payloads

sendMessage (token notification):
sendMessage (topic):
sendDataMessage (app sync):
validateOnly dry-run:

Install

  1. The template ships with the broker. List it with -listTemplates or fetch it from the Hub catalog.
  2. Deploy with -addRoute from FirebaseCloudMessagingRestApi.lot (not hub-metadata.lot).

See also

Last modified on October 21, 2026