go-fcm
go-fcm copied to clipboard
FCM deprecated HTTP legacy send API
On 6/27/2023, we started getting Post \"https://fcm.googleapis.com/fcm/send\": context deadline exceeded
errors (less than 0.2% of the total) in our service that sends push-notifications to FCM.
Looking at FCM announcements, I found that the current API will be discontinued in June 2024 (I'm not sure this is related the announcement):
Firebase has announced that it will discontinue legacy Firebase Cloud Messaging (FCM) APIs starting from June 20, 2024. This decision comes as part of Firebase’s efforts to enhance security and performance. As a result, certain APIs will be deprecated in favor of the available alternatives.
https://blogiestools.com/firebase-legacy-fcm-apis-discontinued/
They have already started deprecating the API, the HTTP legacy APIs was deprecated on June 20, 2023:
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.
Migration instructions
See the migration instructions here: https://firebase.google.com/docs/cloud-messaging/migrate-v1
HTTP requests before:
POST https://fcm.googleapis.com/fcm/send
After:
POST https://fcm.googleapis.com/v1/projects/myproject-b5ae1/messages:send
appleboy/go-fcm/client.go uses:
DefaultEndpoint = "https://fcm.googleapis.com/fcm/send"
Are there plans to update this Endpoint in the library?
- 1
+1
- 1
+1
+1
I will take it.
Hi,when do you fixed this issue ? Do you have any plan ?
Hi there, thanks for all your work maintaining this repo. Just wanted to follow up to see if there was any ETA for this.
Same question as last post. Would be good to know an ETA to consider waiting for the new version or completely switching implementation. This library has been working great so far sending push-notifications to FCM! Thanks for all the work. 🙏
Found out that the library provided by Google calls the new endpoint: v1/projects/{projectsId}/messages:send
:
https://github.com/googleapis/google-api-go-client/blob/85b4e909e1368b10a713262dc4e416a4c7c95956/fcm/v1/fcm-api.json#L117
Will look into that as the alternative to this library.