I'm trying to send a multicast notification via FCM from a Firebase Cloud function with the following code:
const message = {
tokens: recipients,
notification: {
title: title,
body: body
},
data: {
projectPartnerId: projectPartnerId
}
};
return admin.messaging().sendMulticast(message);
And none of the push notifications is getting sent. Each response contains an error with the same message: "Requested entity was not found".
I enabled the API in the Google Cloud console (which was not mentioned anywhere in the Firebase documentation but apparently that was necessary). I don't know what else I can do. And all the other questions I could find related to the HTTP API or the legacy API. I'm using the latest version of the Firebase Admin SDK.