0

Can you give me an example how to send notification to Firebase server from Ionic device?

I tried some codes and I getting error like :

POST https://fcm.googleapis.com/fcm/send 401 ()

Thanks

adjuremods
  • 2,938
  • 2
  • 12
  • 17
Ron
  • 399
  • 2
  • 6
  • 22
  • You cannot send notifications from one device directly to another device. Sending messages *to* a device requires the use of a server key, which (as its name implies) should only be present on a server (in a process you control). For one approach of sending device-to-device notifications through a server, see https://firebase.googleblog.com/2016/08/sending-notifications-between-android.html. The article is written for Android, but the same approach can be applied across all platforms. – Frank van Puffelen Oct 24 '16 at 13:49
  • I mean to send notification from device to server (firebase) and the target is another some users. Take "chat" to example, I want that if someone react in specific chat, another users that react in this chat will receive a notifiaction. – Ron Oct 24 '16 at 16:50

0 Answers0