Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Firebase Cloud Messaging

Schemesfcm://
Cargo featureservice-fcm
Servicehttps://firebase.google.com
Body formatstext (first is the default)
Attachmentsno
Title length250 characters
Body length1,024 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

URL formats

{schema}://{project}/{targets}?keyfile={keyfile}

{schema} is one of fcm://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{keyfile}OAuth2 KeyFilestringyessecret
{project}Project IDstringno
{target_device}Target Devicestringno
{target_topic}Target Topicstringnoprefix #
{targets}Targetslistyesany of target_device, target_topic; separated by /

Query parameters

ParameterMeaningTypeDefaultNotes
colorNotification Colorstringno
imageInclude Imageboolno (usually; depends on the URL)
image_urlCustom Image URLstring
modeModechoiceoauth2one of oauth2; legacy is rejected: that API was shut down in July 2024
priorityModechoiceone of min, low, normal, high, max
toTargetslistsets {targets}

Prefixed parameters:

  • +name=value: Data Entries

The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.

Examples

Rejected URLs:

fcm://
fcm://:@/
fcm://project@%20%20/
fcm://apikey/device

Notes

Firebase Cloud Messaging (fcm://).

Reads a service account JSON key file, signs an RS256 JWT assertion, trades it for an access token and sends through the HTTP v1 API. The legacy API (server keys, fcm/send) was shut down in July 2024: URLs without a key file are rejected. So are URLs with ?mode=legacy.

Differences with Apprise

  • The key file must be local (a path or file://); only RSA service account keys are supported (Apprise fails on others as well).
  • Legacy mode (server API key, fcm/send) defaults on in Apprise when no key file is given, while mercurio rejects such URLs and ?mode=legacy: Google shut that API down in July 2024. Only the HTTP v1 API is used.