NotificationPayload interface

Display notification details. Details are sent through theSend API.

Signature:

exportinterfaceNotificationPayload

Properties

PropertyTypeDescription
bodystringThe notification's body text.
iconstringThe URL to use for the notification's icon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.
imagestringThe URL of an image that is downloaded on the device and displayed in the notification.
titlestringThe notification's title.

NotificationPayload.body

The notification's body text.

Signature:

body?:string;

NotificationPayload.icon

The URL to use for the notification's icon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.

Signature:

icon?:string;

NotificationPayload.image

The URL of an image that is downloaded on the device and displayed in the notification.

Signature:

image?:string;

NotificationPayload.title

The notification's title.

Signature:

title?:string;

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-07-20 UTC.