Search code examples
firebaseerror-handlingfirebase-cloud-messagingaccess-token

Not getting firebase access token


Firebase messaging error in http server, but works well in https server.

; FirebaseError: Messaging: The required permissions were not granted and blocked instead. (messaging/permission-blocked).

Do we need https server to send the notification from the server?


Solution

  • The Firebase Cloud Messaging SDK is supported only in pages served over HTTPS. This is due to its use of service workers, which are available only on HTTPS sites.

    More Information here

    Good luck!