Please provide the following:
- SDK Version: 46.0.0
- Platforms(Android/iOS/web/all):Android
- Add the appropriate “Tag” based on what Expo library you have a question on.
Firebase cloud messaging server api(https://fcm.googleapis.com/fcm/send) is returning a response of 200 in expo app, but the notification never gets received on any of the devices that the app build is installed in, but it works perfectly when i use the firebase console.
Here is the function for sending the notification:
const sendNotification = async (
pushToken: any,
title: string,
message: string
) => {
//sendPushNotification(pushToken, title, message);
await fetch("https://fcm.googleapis.com/fcm/send", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `key=<myTokenKey>`,
},
body: JSON.stringify({
to: pushToken,
priority: "normal",
data: {
experienceId: "@retemember/rete",
scopeKey: "@retemember/rete",
title,
message,
},
}),
});
};