2

I am trying to put restrictions on Google Maps API Key used for both Google Maps SDK on iOS and Geocoding.

Choice 1: Use one API Key.

However, when I restrict an API Key in the following combination, it does not work:

  • Application Restriction: iOS Apps
  • API Restriction: Geocoding API

Alternative workaround I found, create two API Keys:

  • API Key 1: Maps SDK for iOS; Application Restriction: iOS Apps
  • API Key 2: Geocoding API; API restriction: Geocoding API

The problem with the alternative solution is, my API Key 2 remains vulnerable since there is no Application Restriction in place.

MrUpsidown
  • 21,592
  • 15
  • 77
  • 131
  • 1
    Geocoding API is a web service and it supports only IP address restrictions as explained in https://developers.google.com/maps/faq#keysystem. You should mount an intermediate server in order to protect your API key for Geocoding. Similar question: https://stackoverflow.com/questions/40736854/can-i-restrict-google-direction-api-to-ios-apps-only/40744769#40744769 – xomena Aug 21 '18 at 22:53
  • 1
    Geocoding API is a web service and it supports only IP address restrictions as explained in https://developers.google.com/maps/faq#keysystem. You should mount an intermediate server in order to protect your API key for Geocoding. Similar question: https://stackoverflow.com/questions/40736854/can-i-restrict-google-direction-api-to-ios-apps-only/40744769#40744769 – xomena Aug 21 '18 at 22:53

0 Answers0