Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
309 views
in Technique[技术] by (71.8m points)

android - Why Google places API key not works?

I want to use Places API for show near by location.I have added service for it and use below url. https://maps.googleapis.com/maps/api/place/search/json?location=22.7253,75.8655&radius=500&sensor=true&types=bar&key=mykey

It returns the following error. { "error_message" : "This IP, site or mobile application is not authorized to use this API key.", "html_attributions" : [], "results" : [], "status" : "REQUEST_DENIED" }

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It looks like you try to use Web Service, not Places API for Android. In this case you cannot apply an API key with Android app restriction. Web Service requires a different API key. You can generate the new one, the only restriction that you can use with web services is by IP.

I can suggest following Places API web service documentation:

https://developers.google.com/places/web-service/get-api-key


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...