0

I was planning to send data messages (I do not mean notification messages!) to specific users via FCM. I tried the REST Api named ARC but since it is still in beta use it seems like there are still some issues that need to be fixed. I get "401 Unauthorized" all the time so I was looking for another way to get these messages to the users. How exactly am I supposed to send the requests to the Firebase-endpoint (https://fcm.googleapis.com/fcm/send)?

MY Request looks like this: Request

Thanks alot!

nymvno
  • 155
  • 2
  • 12
  • Without seeing the [minimal code that reproduces the problem](http://stackoverflow.com/help/mcve) (read the link, it's quite useful), it will be hard to say more than that you're not passing the server key in (correctly). – Frank van Puffelen Mar 24 '17 at 16:19
  • I chose the "current key" in the "api_key" out of the google-services.json but I don't know if this is the right one.. – nymvno Mar 24 '17 at 17:06
  • 1
    See http://stackoverflow.com/questions/37427709/firebase-messaging-where-to-get-server-key (the top result when I search for [site:stackoverflow.com find fcm server key](https://www.google.com/search?q=site:stackoverflow.com+find+fcm+server+key)). – Frank van Puffelen Mar 24 '17 at 19:53
  • Thank you that helped a lot! I was unsure what to search for but the issue was caused by passing the wrong server key and now it works fine. – nymvno Mar 25 '17 at 10:57

0 Answers0