Firebase Cloud Message optional parameter

41 Views Asked by At

How can I include a Notification name key with value "My New Name" in json to send a push notification?

{
  "to": "fECXbr5qTkOb9CSAqy3hRB:APA91bEF2A1-b6r8pO6W_9X-2s6HF1kShZVXL3KuMMOpMwKhgbvg6j85Ngk66AKFwTYDZ8c8dUcs5PSTEBKohzJM10a1HKxdHldw8kO9XcZu2B_G2n61K2dRX_Wx9qzRanyfz-73cgLw",
  "content_available": null,
  "priority": "high",
  "notification": {
    "title": "Hello world",
    "body": "This is a test message :)"
  },
  "topic": null,
  "fcm_options": {
    "analytics_label": "SIS_CAMP"
  }
}

Notification Name

I tried to use many keys: tag, displayName, name, subtitle, ...

1

There are 1 best solutions below

0
Frank van Puffelen On

As far as I know, the Notification name that you can enter in the console is only used to identify the campaign in the Firebase console.

You can't create such campaigns through the API and messages sent through the API are not shown in the console, so there is no way to set such a Notification name through the API.