I ran into such a problem, when I tried to initialize firebase and get the FCM token, I get this error, who faced it? What could be the reason? A month ago, everything worked, after that nothing was changed in google-services.json file, firebase flow in project, or in google console.

API key permissions added

I fixed same error while adding push notifications into iOS project:
Fixed on Google Cloud console -> APIs & Services -> Credentials

then CLICK on the API Key you are using for the app having problems

Scroll to the API restrictions section

expand the combo box and select Firebase Cloud Messaging API and Firebase Installations API hit OK after selecting both and SAVE this.

REMEMBER: Wait 5 to 10 minutes to test this working, so be patient and grab a coffee before testing again :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With