Skip to content

Notify_fcm

Chris Caron edited this page Jan 2, 2021 · 7 revisions

Firebase Cloud Messaging (FCM)

Account Setup

You'll need to create an account with Google's Firebase Cloud Messaging Service (FCM) first to use this.

This plugin uses the HTTP v1 API and NOT the Legacy HTTP API service. See here.

Syntax

Valid syntaxes are as follows:

  • fcm://{Project}@{APIKey}/{Device}
  • fcm://{Project}@{APIKey}/{Device1}/{Device2}/{DeviceN}
  • fcm://{Project}@{APIKey}/#{Topic}
  • fcm://{Project}@{APIKey}/#{Topic1}/#{Topic2}/#{TopicN}

You can mix and match these entries as well:

  • fcm://{Project}@{APIKey}/{Device1}/#{Topic1}

Parameter Breakdown

Variable Required Description
Project Yes The generated Project ID from the FCM Management Console
APIKey Yes The generated API Key from the FCM Management Console
Device No The device you wish send your message to
Topic No The topic you want to publish your message to.

Note: This notification service does not use the title field; only the body is passed along.

Example

Send a FCM notification:

# Assuming our {Project} is Apprise
# Assuming our {APIKey} is bu1dHSdO22pfaaVy
# Assuming our {Device} is ABCD:12345

apprise -vv -t "Test Message Title" -b "Test Message Body" \
   fcm://Apprise@bu1dHSdO22pfaaVy/ABCD:12345
Clone this wiki locally