1

I am creating android app and I have to implement maps and places so, I have created new google places API and when I send request using volley to get placeId from latitude and longitude I get error which says

{"error_message":"You have exceeded your daily request quota for this API.","html_attributions":[],"results":[],"status":"OVER_QUERY_LIMIT"}

But it is working fine on postman so, how can I fix this?

P.S. I am beginner so please correct me if there is any mistake in my process. Thank you.

DoeJ
  • 405
  • 1
  • 4
  • 14

2 Answers2

2

I believe Google's terms of service is restricting use of Place API from client application i.e your android app. I also have seen this in other question's comment. (As Troy Perales also has mentioned)

For tutorials or example for implementing Google API click here and here. These are Codelabs examples on implementing Google Places API.enter code here And here's Places Docs

I hope this helps you.

SaWin0
  • 643
  • 5
  • 18
1

When developing for Android, Google recommends using the Places SDK for Android (https://developers.google.com/places/android-sdk/intro) instead of the Places API (https://developers.google.com/places/web-service/intro) because it is free and has generous usage limits. See https://developers.google.com/places/android-sdk/usage.

Troy Perales
  • 189
  • 1
  • 5
  • thank you but this is new api just created how come it exceeded 2500 request? And as I have mentioned it is working fine on postman. I can't find way to get placeId from Places SDK for Android so I used Places API. – DoeJ Aug 13 '18 at 03:08
  • There are a number of SO posts with your same experience: - [https://stackoverflow.com/questions/40570594/using-google-places-web-service-in-an-android-app] - [https://stackoverflow.com/questions/34521700/how-to-access-google-places-web-service-from-android-application] - [https://stackoverflow.com/questions/35195516/how-to-use-google-places-api-for-web-service-in-android] Looks like Google is forcing the usage of the Android SDK. For Place ID, did you already try https://developers.google.com/android/reference/com/google/android/gms/location/places/Place.html#getId() ? – Troy Perales Aug 13 '18 at 03:15
  • I tried reading docs but couldn't understand if there is example then it would be great help. – DoeJ Aug 13 '18 at 03:20
  • You were right that Google's terms of service is restricting this from being used in a client application (like in an android app). – DoeJ Aug 13 '18 at 03:25