1

I try to send a push notification using ionic cloud, but Google now requires a restriction key . I don't know how to get key restriction. Please help me.

enter image description here

AL.
  • 36,815
  • 10
  • 142
  • 281
yaibait
  • 86
  • 2
  • 10
  • I'm not familiar with this, but the way I read that screen is this is setting the Key Restriction, either None, or by Referrers, IP Addresses etc. You might not need one, just need to set your restriction appropriately? – Tim Bull Sep 16 '16 at 17:00
  • I have tried use None and I can't send push from test server until I settings server ip in Key Restriction – yaibait Sep 19 '16 at 00:57

1 Answers1

1

Update: There is now a visible note in the GCM docs saying:

Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.


There have been recent changes with regards to the Google Developers Console interface when generating an API Key. Before there used to be a part where you have to select what type it is (Server, Android, iOS, Browser keys). But now, it automatically creates then you can simply select the type of restriction you want, depending on where you'll use the key.

I haven't tried using Ionic before, but I think it's pretty much the same where you'll use the API key (in this case, the Server Key). Simply set the correct server IP Address in the IP address whitelist and try again.

Do keep in mind that adding restrictions are highly encouraged for your security against unauthorized use and quota theft (seen as a warning for API keys with no restrictions).

See my answer here for more details.

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