kawankoding / laravel-fcm

Firebase Cloud Messaging (FCM) sender for Laravel
172 stars 56 forks source link

Migrate from legacy FCM APIs to HTTP v1 #63

Open stojankukrika opened 1 year ago

stojankukrika commented 1 year ago

Hi, I get an email from Google where they tell me that I use legacy code for FCM:

We’re writing to let you know that starting June 20, 2024 the legacy Firebase Cloud Messaging (FCM) APIs will be discontinued.

What do you need to know?

On June 20, 2024, we’re reducing the number of Firebase Cloud Messaging (FCM) legacy register APIs and legacy send APIs that provide similar functionality. This step will allow us to provide you with a more consistent experience and align with Google security standards to improve security, reliability and performance.

Because of these API decommissions, some already-deprecated SDKs and features will stop working after June 20, 2024.

Please consult the tables below to find which Firebase Cloud Messaging (FCM) APIs and corresponding services/SDKs/features will be discontinued and replaced with new alternatives.

Discontinued Send API | Decommissioned service | New alternative -- | -- | -- Legacy HTTP Protocol | Sending messages via the Legacy HTTP API. | Send messages via the HTTP v1 API. XMPP Protocol | Sending upstream and downstream messages via the XMPP API. | Send downstream messages via the HTTP v1 API.Send upstream messages via HTTP/gRPC directly from the App to your server. Batch send API | Including multiple send requests in a single HTTP request to FCM known as Batch Send. | Send messages via the HTTP v1 API, which has been optimized for fanout performance

We’re writing to let you know that starting June 20, 2024 the legacy Firebase Cloud Messaging (FCM) APIs will be discontinued. What do you need to know? On June 20, 2024, we’re reducing the number of Firebase Cloud Messaging (FCM) legacy register APIs and legacy send APIs that provide similar functionality. This step will allow us to provide you with a more consistent experience and align with Google security standards to improve security, reliability and performance. Because of these API decommissions, some already-deprecated SDKs and features will stop working after June 20, 2024. Please consult the tables below to find which Firebase Cloud Messaging (FCM) APIs and corresponding services/SDKs/features will be discontinued and replaced with new alternatives. Discontinued Send API Decommissioned service New alternative Legacy HTTP Protocol Sending messages via the Legacy HTTP API. Send messages via the HTTP v1 API. XMPP Protocol Sending upstream and downstream messages via the XMPP API. Send downstream messages via the HTTP v1 API. Send upstream messages via HTTP/[gRPC](https://notifications.google.com/g/p/ACUgQrHu-Vnhe_m1qjrhalvtIUq8b-tdd2k6SUbjp55uvASEz2-Wy2Zw5e9YnZcsxHh9O-Sjm2AyFmzvcIqDYhD_xYJH9ewMEC0qlD2bZR3f4st3GF7wgXvSosahwK6_hJH0sTraYEcSb-ZP7ARXwW3A74byjHivf3kH8e0oI8F5r1XV7rio6yi8eJjCwwmF3QKL_C88kN763GIGpTdP3XlvzrX8fFV4uw) directly from the App to your server. Batch send API Including multiple send requests in a single HTTP request to FCM known as Batch Send. Send messages via the HTTP v1 API, which has been optimized for fanout performance Discontinued Register API Decommissioned SDK New alternative GCM register API Google Cloud Messaging(GCM) SDKs (deprecated in 2018). Latest FCM Android SDK. Legacy Web register API FCM JS SDK version<7.0.0 (deprecated in 2019) Latest FCM JS SDK. Instance ID Server API for Web No SDK related to this API. Latest FCM JS SDK. Discontinued Feature Decommissioned service New alternative Server keys Authenticating requests with server keys. Authenticate requests with [access tokens generated from authorized service accounts](https://notifications.google.com/g/p/ACUgQrFnegb3n4gkf7Si2B9WSUfai9T-snRJ1bT2fFaZYnGdVq0k8N3bM0nYldJ8bPcYVnhGTeAHoFRSbRImSJX9b8RObefWCeqtLxr2nvQtqDENRa5TDYgZGb9tz-AdIqWFG4oOPjJ0Jx2m2uPcGI0MYtccsSCWgjQqiqNKE-qeracSbodIN1UC28KdAy7sOlJEfch87UYv04RV_QNaJlSpoP9QCY8RvrQAwdfLmN4ePN1T5vyHoyKUCZut4y_dtgrRjlU4yhCmnYY) iOS Direct Channel Sending messages via FCM’s direct channel to iOS devices while they are running in the foreground. All iOS messages will be sent via APNS channel. What do you need to do? Take the following actions before June 20, 2024, to ensure that you have access to the latest supported features and to reduce the risk of future decommissions affecting your usage: Follow the instructions described in [Firebase FAQ](https://notifications.google.com/g/p/ACUgQrEuFmr-GxhkgrHNUhT_kO5enQquuGPAseHgsOLGaHhf4HnBRvjq1TJsenbVhzHCnNbH412bk_d9ylnBR9nfdK-eGRs8qUNj99CjBzT2cEf6ItvIcHeaADeYcoEx2oDPEA2BGnuLI4okAoV0uv9KTkdoviCESS_WFCcLF8klliOhqI5WIi_6murMvFi0tw7aNCJHglgMzFdMSs9M6KlyomC9rRZY1PleNw) to migrate your individual APIs. Update to the latest versions of Firebase SDKs. Platform Recommended FCM SDK version Android >= 23.1.2 iOS >= 10.10.0 Web (Javascript) >= 9.22.1 Then I a little bit take a look package and see that it use the old way to send Firebase FCM registration. Can you take a look at those URLs: https://firebase.google.com/docs/cloud-messaging/migrate-v1?authuser=1 and https://www.b4x.com/android/forum/threads/firebase-sending-tool-needs-update-to-support-firebase-cloud-messaging-v1.141044/#post-893722 and make an update or tell me which package I can use to migrate if you do not have the powers or time to make an update. Best regards to the creators :)