FCM api is returning a response of 200 in expo app, but the notification never gets received

Please provide the following:

  1. SDK Version: 46.0.0
  2. Platforms(Android/iOS/web/all):Android
  3. 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,
        },
      }),
    });
  };

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.