react-native-google-places icon indicating copy to clipboard operation
react-native-google-places copied to clipboard

Android - This IP, site or mobile application is not authorized to use this API key. Request received from IP address **** with empty referer

Open idanhaviv opened this issue 4 years ago • 13 comments

Hi,

I'm getting this error on Android using a restricted key.

  1. Added Certificate Fingerprints for both debug & production
  2. Api key in both prod & debug AndroidManifest.xml files
  3. Api key is in gradle.properties file with RNGP_ANDROID_API_KEY key

also, using an unrestricted key works fine for the Android app, and using a restricted key for the iOS app also works fine.

what am I missing?

idanhaviv avatar Apr 14 '20 09:04 idanhaviv

This is happening for us too, but only for a few devices and only in production mode. Did you find any solution for this?

subramanyaRB avatar May 28 '20 12:05 subramanyaRB

@subramanyaRB nothing yet

idanhaviv avatar May 31 '20 07:05 idanhaviv

Same problem for me here in dev environment. @idanhaviv did you put API KEY in AndroidManifest file? The README don't say nothing about it

leandrocunha avatar Nov 11 '20 10:11 leandrocunha

Same problem here

Loown avatar Nov 30 '20 12:11 Loown

any updates?

howsy-jego avatar Apr 16 '21 15:04 howsy-jego

I'm starting to get this as well, everything works pretty well when I built out the APK and test with my own Android phone but when publishing to store it stops working for others

phatlaunchdeck avatar May 07 '21 15:05 phatlaunchdeck

facing same issue.. please suggest solution

ubaidjs avatar Jul 03 '21 10:07 ubaidjs

Have you tried some solutions proposed here: https://developers.google.com/maps/faq#api-key-error

A bit late but still might be useful for somebody.

stefano-bini avatar Aug 03 '21 10:08 stefano-bini

Same problem on dev environment. Using an unrestricted key works fine for the Android app. Any solution?

bjuzwicki avatar Aug 04 '21 20:08 bjuzwicki

The reason this error is occurring because of the restrictions you have added when you create add the sha1 fingerprint on google cloud console , remove the fingerprints from android or ios then save .(the ip of that mobile phone will not be restricted)

kariukis avatar Jan 11 '23 12:01 kariukis

Has anyone found any solution for this, this is happening on stage env on my device

thorfinnko avatar Apr 03 '23 09:04 thorfinnko

This issue is till open, 3 years after, I am still encountering the same issue, followed all steps given in the expo documentation to app the SHA-1 fingerprint to my google console, and also configure the app.json accordingly, but issue still persists. If there is anyone who has figured out a way, please share. Had to create a new API key and reproduce the steps and still, error persists.

Chosen2730 avatar Oct 25 '23 06:10 Chosen2730

https://maps.googleapis.com/maps/api/place/findplacefromtext --> iam using this url to find out the place from text in placesapi how to know the request is coming from android or ios in this url

subins829 avatar Apr 29 '24 06:04 subins829