I would like to send message from device to the app server.
1) I run the following command to send a message to Firebase and it is successful with a valid message id:
curl -X POST --header "Authorization: key=" --header "Content-Type: application/json" ht-d "{\"to\":\"/topics/foo-bar\",\"notification\":{\"body\": \"HEY YO\"}}"
{"message_id":5634438218616813911}
2) But when I run the node code in server with the right configuration:
I would like to send message from device to the app server.
1) I run the following command to send a message to Firebase and it is successful with a valid message id: curl -X POST --header "Authorization: key=" --header "Content-Type: application/json" ht-d "{\"to\":\"/topics/foo-bar\",\"notification\":{\"body\": \"HEY YO\"}}"
{"message_id":5634438218616813911}
2) But when I run the node code in server with the right configuration:
xcs.on('message', function(messageId, from, data, category) { console.log('received message', data); });
There is no message in the console.
Please advise what I am missing.