1

I am trying get the json response from google place api.

I followed all step and suggestion:

  • Create Browser key instead than android api key
  • Create server key instead than android api key

it does not work any the steps above.

the message is the following.

{
   "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 200.104.xx.xx, with empty referer",
   "html_attributions" : [],
   "results" : [],
   "status" : "REQUEST_DENIED"
}
Slinker
  • 379
  • 1
  • 4
  • 14
  • What were the previous errors when you used an android api key? What package name did you use? – Stephan Branczyk Jun 10 '15 at 00:41
  • How are you making the initial request? – Tigger Jun 10 '15 at 00:50
  • 1
    This might help: http://stackoverflow.com/questions/23289380/this-ip-site-or-mobile-application-is-not-authorized-to-use-this-api-key-with-i – Daniel Nugent Jun 10 '15 at 01:07
  • possible duplicate of [Requesting JSON from Google Maps gives me REQUEST\_DENIED](http://stackoverflow.com/questions/29931513/requesting-json-from-google-maps-gives-me-request-denied) – Anderson K Jun 11 '15 at 16:04

1 Answers1

0

I have been reading more and the best way to work with place from Android App is Google Places API for Android has a good library to get places and information about it.

to use this I should allow in my manifest file specifics permission.

<application>
  ...
  <meta-data
      android:name="com.google.android.geo.API_KEY"
      android:value="API_KEY"/>
</application>

See more https://developers.google.com/places/android/

ssi-anik
  • 2,998
  • 3
  • 23
  • 52
Slinker
  • 379
  • 1
  • 4
  • 14
  • Are you sure it's a good idea? The docs always say that developers should not put their key on a versioned file (e.g. AndroidManifest) – Leonardo Sibela Dec 26 '16 at 20:55