It sounds like they intend the Geocoding API to only be used in server-side applications. How would you take advantage of a IP address-restricted API key in a non-Expo (i.e. “vanilla” Android or iOS) app?
I agree, it looks like as far as Google guys intend Geocode and Places APIs not to be invoked from front apps, as they don’t allow referer or any other sort of web restrictions for those APIs.
In fact, I can’t figure out a way to restrict the usage of the key in Expo, or any other web client for those APIs, apart from proxying the requests from my own gateway or middleware.
Not sure if someone using expo has used the places API for creating a google autocomplete, or it is using some component like react-native-google-places-autocomplete in production with restricted keys.
Look like those apis also allow restricting key based on iOS or Android module name, on using Google iOS SDK or Google Android SDK, but I have no idea if I can use those restrictions with EXPO, since this is my first time with Expo.
Faced a similar issue while trying to use Places and Geocoding APIs.
The documentation specifies that these are web service requests, so I was unabled to make them work from the expo app itself.
I was able to solve this issue with moving the api requests to my backend and restricting by ip address with my server’s ip address. Upon reading more on this subject, I think this would be the only solution, since you can’t possibly enable every ip address that tries to make requests from your app.
The Android apps / iOS apps restrictions apply for other APIs, but geocoding and places will still remain web services so that still won’t help you here !