Firebase Cloud Messaging (FCM) - HTTP V1 API or Legacy HTTP API?

前端 未结 2 1584
野趣味
野趣味 2021-01-02 18:35

Our goal is sending notifications to groups of devices from our backend, and only from server side is possible to know which device should receive the notif

相关标签:
2条回答
  • 2021-01-02 19:16

    Got here from the link in your comment in my answer here. And just to reiterate my response there, when sending messages to multiple tokens with v1, the suggested approach now is to use Topics Messaging, since registration_ids is not supported.

    Is it better to use legacy API?

    v1 was described as the more secure, cross platform, future proof way of sending messages to FCM clients. More secure since it uses OAuth2 security model.

    However, if your use-case is better with using the legacy API, then I suggest you go ahead with using it.

    0 讨论(0)
  • 2021-01-02 19:18

    This page suggests that you should stay with the legacy API if you want to continue to use the multicast feature: https://firebase.google.com/docs/cloud-messaging/migrate-v1

    Any apps that use device group messaging or multicast messaging, however, may prefer to wait for future versions of the API. HTTP v1 does not support these features of the legacy API.

    0 讨论(0)
提交回复
热议问题