2

My manifest file is in the root folder, referenced in the _Layout view as following:

<link rel="manifest" href="~/manifest.json">

The file structure is as following:

{
"gcm_sender_id": "MY_Sender_Id",
"permissions": [
"gcm"
] 
}

Keep getting 401 unauthorized, in chrome dev tools under the application tab, this is what I get:

enter image description here

AL.
  • 36,815
  • 10
  • 142
  • 281
threesixnine
  • 1,733
  • 7
  • 30
  • 56
  • Are you positive you're using the correct value for the `gcm_sender_id`? – AL. Jul 15 '17 at 06:06
  • @AL. Yes, have even closed an account and created a new one, to get a new sender id just in case the previous one was corrupted. – threesixnine Jul 15 '17 at 12:49

1 Answers1

3

When using FCM for Web, the value for gcm_sender_id is fixed. From the docs:

{
  "//": "Some browsers will use this to enable push notifications.",
  "//": "It is the same for all projects, this is not your project's sender ID",
  "gcm_sender_id": "103953800507"
}

Don't confuse the "browser sender ID" with the project-specific sender ID value shown in your Firebase project settings. The browser sender ID for manifest.json is a fixed value, common among all FCM JavaScript clients.

AL.
  • 36,815
  • 10
  • 142
  • 281