Skip to main content
Technical Preview

Overview

Client-mode REST API connectors for Firebase: write device state, append events, and query history in the Realtime Database, and upsert, merge, and query Cloud Firestore documents from MQTT. This is one of the templates in the Firebase Realtime Database and Cloud Firestore REST API app (firebase-realtime-database-and-cloud-firestore). Deploy it alongside the other connectors of that app when they depend on each other (for example a token connector plus an API connector). See Firebase Realtime Database and Cloud Firestore for the package overview.

Auth

Bearer {value.json.access_token} on both connectors. RTDB: Google OAuth2 SA token (userinfo.email + firebase.database); alt ?access_token= or Firebase ID token via ?auth=. Firestore: Google OAuth2 SA token (roles/datastore.user) or Firebase ID token (rules apply). Hub secret FIREBASE_ACCESS_TOKEN. Auth headers used by the template: Authorization: Bearer {value.json.access_token}.

Template parameters

BASE_ADDRESS default: https://firestore.googleapis.com.

Events

Deploy

Get the template card (JSON with template and metadata) from the broker, then deploy the connector:
The deployable connector from the REST API app, with BASE_ADDRESS already filled in:
Deploy it with -addConnector (do not include ADD METADATA).

Usage example

Call UpsertDocument by publishing a JSON payload to its request topic, and read the reply on the response topic:
Last modified on October 26, 2026