How - HTTP publisher to Firebase Cloud Messenger?
-
Hi, does anyone know the correct HTTP Sender properties to POST datapoints to Firebase Cloud Messenger?
I am stuck.
-
Hi Balistar,
The HTTP Publisher was not crafted for Firebase, so you may have some hurdles trying to get that working.
Have you considered the HttpBuilder in the scripting environment? This way you can authenticate if need be, but it would enable you to do something like...
HttpBuilder.post("sptth://firebase", { "authenticationHeader": "value!" }, { "message":{ "token" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...", "notification" : { "body" : "This is an FCM notification message!", "title" : "FCM Message", } } }).err(function(status, headers, content) { throw content; }).resp(function(status, headers, content) { /* Do any work you need for successful responses */ }).execute();
Edit: Here's a thread with a little more fleshed of a script example using that utility: https://forum.infiniteautomation.com/topic/2999/intesis-integration/2
-
Thanks Phil,
HTTP Publisher actually works perfectly for Firebase. Took some playing with Postman, but it turns out to be easy..
But using HttpBuilder in a script is a lot more flexible.
-
Nice, good to know! Thanks for sharing!