MikeMon 12 Posted May 19, 2020 Hi I've setup firebase cloud messaging and everything is working fine both on iOS and Android, i.e. I can send push notifications through the Firebase Cloud Messaging console. What I want to do is to develop my own console with which I want to send my firebase push notifications. I came across the following in the FCM app server protocols: https://fcm.googleapis.com/fcm/send To test it, I'm using the "Embarcadero REST Debugger" software. As per the FCM documentation, I've add a header called "Authorization" with a value of "key=XYZ". XYZ is the "Server Key" value in the Firebase Console's "Cloud Messaging" setting of my App. Unfortunately I keep on getting a "401: INVALID_KEY" response. Is there anything else I need to do to make it work? Share this post Link to post
Dave Nottage 557 Posted May 19, 2020 Does it need to be a "server"? I have this desktop app: https://github.com/DelphiWorlds/PushIt 1 Share this post Link to post
MikeMon 12 Posted May 20, 2020 10 hours ago, Dave Nottage said: Does it need to be a "server"? I have this desktop app: https://github.com/DelphiWorlds/PushIt Hi Dave. Thank you for your valuable input. I compiled and ran your desktop app and it's working perfectly. I will check your code and see what I'm missing. Share this post Link to post
MikeMon 12 Posted May 20, 2020 3 hours ago, MikeMon said: Hi Dave. Thank you for your valuable input. I compiled and ran your desktop app and it's working perfectly. I will check your code and see what I'm missing. Hi @Dave Nottage After some playing around, I found out what the problem was. The "Authorization" header should not be encoded. Now, everything works fine by using REST. FYI, the pre-complied RESTDebugger.exe that comes with Delphi 10.3.3 doesn't have the "Do Not Encode" checkbox when adding parameters. I had to recompile its project and it was there. 1 Share this post Link to post