Tuesday, 4 April 2017

Successful message not received on device

I am trying to send the push notification to my android device using firebase,I am calling the firebase api with post parameter,when I call the api it gives me 200ok, but in my device I am not receiving any notification. I tried with same device token using firebase console website and here I am able to send it and its coming in my device, Below is my call of node js

request({
url: 'https://fcm.googleapis.com/fcm/send',
method: 'POST',
headers: {'Content-Type' :' application/json','Authorization': 'key=AA'},
body: JSON.stringify({ 
"to" : deviceId,
"priority": "high",
"notification": {
"message": message,
"body": "ipl matches are there",
"title": "Portugal vs. Denmark",
"text": "5 to 1"
 },}),

Can any one please let me know what is wrong here. thanks



via user3817378

No comments:

Post a Comment