After running the following code
import * as admin from "firebase-admin";
import * as serviceAccount from "../../firebase_service_account_key.json";
const app = admin.initializeApp({
credential: admin.credential.cert(serviceAccount as any),
databaseURL: "https://my-app.firebaseio.com"
});
const messaging = app.messaging();
export async function sendPushNotification(token: string, title: string, body: string) {
const resp = await messaging.send({
token,
notification: {
title,
body,
}
});
console.log(resp);
}
I get this output
projects/choose-health-app/messages/0:1559686024913017%0b13c0ce0b13c0ce
It would appear the response is some type of id for the message that was just sent. From this answer on Stack Overflow (How to check the delivery status of Firebase message sent to an Android application?) it would appear I can not use this id to track the state of the cloud message (which I would really like to do, because it's currently just disappearing into the void). But I don't understand what the point of returning this ID would be if it can't be used to track it.
So what can I do with this cloud message id? Of what use or value is it? Just book-keeping? I can't seem to find any way to use it to gain information, or fulfill the needs of some function.
EDIT: The reason I care is that right now this is the only information I have around a bug, and I just want to know as much as possible about it.