I have written the client side code to receive the push notifications using service workers in my web app, Im running the app on localhost. How to invoke the notifications. I have included a manifest.json with sender_id.
Send a request from the command line for FCM to push a message, referred https://developers.google.com/web/fundamentals/getting-started/codelabs/push-notifications/ While executing curl command in terminal, I get the invalid registration error.
{"multicast_id":xxxxxxxxx,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
I have verified server key and endpoint subscription ID, they are correct. But what is the issue ?
I have hosted my app using chrome web server, but how can I sendpush notification?
I have created a sample project Sample-App, I have hosted it on chrome webserver http://127.0.0.1:8888, and in firebase I have created project with Sample-App name which will generate API server key and gcm_sender_id.
I have also checked by hosting my code on github with https url, still the same issue