Cloud Messaging: The firebase-admin-sdk cloud messaging migration from legacy FCM APIs to HTTP v1 #2518
Replies: 5 comments 1 reply
|
As I understand it, the Admin SDK Code has supported the HTTP v1 API for quite a while, but you have to use the messaging().send() Method instead of sendToDevice() (and other sendTo*-Methods), since the deprecatred sendTo*() Methods use the Legacy URLs. Someone please correct me if I'm wrong. |
|
@georgwiltschek is correct, the The SourcesIn the FAQ for FCM features deprecated in June 2023 there is a section on Firebase Admin SDK APIs:
It also says that Node.JS Firebase Admin versions >=11.7.0 have the new APIs. |
|
thanks for the complete response @mikejpeters i will try it now |
|
would be niice to put a migration guide as sendToDevice has different arguments than send |

@georgwiltschek is correct, the
send()method has always used the v1 API since it was added to this SDK in 6.0.0, so it should be safe to use regardless of what version of the SDK you are on.The
sendToDevice/sendToDeviceGroup/sendAll/sendMulticastmethods will stop working, and you have the option to switch to thesend()method instead, or use the new APIs provided in SDK >= 11.7.0.Sources
In the FAQ for FCM features deprecated in June 2023 there is a section on Firebase Admin SDK APIs:
sendToDevice()send()method.sendToDeviceGroup()