I am working on push notifications by using Google's firebase for a web app(desktop). I have implemented the code given by Google to generate a token on the client's computer by using my credentials of firebase.
The issue is that when I send the request by using ARC client of chrome, I receive the notification popup. But when I try to send the request by using CURL in PHP, I get a success message and the messaged gets displayed on my localhost/index.html (used to generate token and to manage push notification [provided by Google firebase]). Here is the message that gets displayed.
Received message:
{
"from": "565634123456",
"collapse_key": "do_not_collapse",
"notification": {
"title": "Test title",
"body": "Test content",
"icon": "firebase-logo.png",
"click_action": "http://localhost/index.html"
}
}
I wanted a notification popup to appear and not the successful message to be displayed on my index.html. Can anyone please guide here?