Description
Symfony version(s) affected
6
Description
Google disable /send api see https://firebase.google.com/docs/cloud-messaging/http-server-ref?hl=en
Caution: Sending messages (including upstream messages) with the FCM XMPP and HTTP legacy APIs was deprecated on June 20, 2023, and will be removed in June 2024. If you are using the legacy send APIs, we strongly recommend that you migrate to the HTTP v1 API or consider using the Admin SDK to build send requests.
Apps using the FCM legacy HTTP API should consider migrating to the HTTP v1 API. See the migration guide for more information about the v1 API's advantages and for migration instruction.
So we cant send any message to old api
How to reproduce
When try to send a message to old api method you will get
In FirebaseTransport.php line 92:
[Symfony\Component\Notifier\Exception\TransportException]
Unable to post the Firebase message: <HTML>
<HEAD>
<TITLE>INVALID_KEY</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>INVALID_KEY</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
Due to protected const HOST = 'fcm.googleapis.com/fcm/send';
Possible Solution
Need to implement migrated method : https://firebase.google.com/docs/cloud-messaging/migrate-v1?hl=en
Additional Context
No response