Sends a Firebase Cloud Messaging (FCM) notification using the HTTP v1 API.
Requires the GOOGLE_APPLICATION_CREDENTIALS environment variable to be set to the path of a Firebase service account JSON file.
If GOOGLE_APPLICATION_CREDENTIALS is not set or credentials are invalid.
await sendFcmHttpV1({ token: "recipient_token", notification: { title: "Hello", body: "World" }, data: { key: "value" }}); Copy
await sendFcmHttpV1({ token: "recipient_token", notification: { title: "Hello", body: "World" }, data: { key: "value" }});
Sends a Firebase Cloud Messaging (FCM) notification using the HTTP v1 API.
Requires the GOOGLE_APPLICATION_CREDENTIALS environment variable to be set to the path of a Firebase service account JSON file.