Search code examples
firebase-cloud-messagingbackend

How to send and receive upstream messages to FCM now ? After June, 2024


Can anyone help with my trouble ? I want to send upstream messages to Firebase and on my backend receive this message for calculating delivery rate. In past we can do it via XMPP, but to June, 2024 its will be removed.

I don't have any idea. I don't found any information to send upstream messages to backend. Only via FCM bigQuery, but this is another way which not really fits me


Solution

  • From the Firebase FAQ:

    Which FCM APIs were deprecated on June 20, 2023, and what should I do if I am using those APIs?

    The following APIs/SDKs will be affected by the deprecation:

    API Name API Endpoint Impact on users Action Required
    ... ... ... ...
    Upstream messaging via XMPP fcm-xmpp.googleapis.com:5235 API calls to FirebaseMessaging.send in the app won’t trigger upstream messages to the app server after 6/21/2024. Implement this functionality in your server logic. For example, some developers implement their own HTTP/gRPC endpoint and call the endpoint directly to send messages from their clients to the app server. See this gRPC Quick start for an example implementation of upstream messaging using gRPC.
    ... ... ... ...

    So you will have to implement your own HTTP or gRPC endpoint for this logic.