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
- Create a Firebase / Google Cloud service account with permission to use FCM (scope
https://www.googleapis.com/auth/firebase.messaging). - Exchange a signed JWT for a short-lived access token at
https://oauth2.googleapis.com/token(or use Application Default Credentials /gcloudoffline). Store the token in Hub asFCM_ACCESS_TOKEN. - Set connector
BASE_ADDRESStohttps://fcm.googleapis.com. - Pass
access_tokenandproject_idon MQTT JSON payloads so the Authorization header and path resolve. Put the FCMmessageobject (and optionalvalidateOnly) in the same JSON —{payload}is the HTTP body. - Never commit service-account JSON,
GOOGLE_APPLICATION_CREDENTIALSfiles, or live tokens. - Successful send returns HTTP 200 with a
Messageincludingname. UsevalidateOnly: truefor dry-run smokes.
Example payloads
sendMessage (token notification):Install
- The template ships with the broker. List it with
-listTemplatesor fetch it from the Hub catalog. - Deploy with
-addRoutefromFirebaseCloudMessagingRestApi.lot(nothub-metadata.lot).

