本文介绍了Google Place API - 始终返回此“状态” :“REQUEST_DENIED”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Google Place API,每当我要访问此链接时,都遇到问题。 maps.googleapis.com/maps/api/place/search/json?location=latitude,longitude&radius=1&sensor=false&key=apikeyrel =nofollow> https://maps.googleapis.com/输入信息的地图/ api / place / search / json?location =纬度,经度& radius = 1& sensor = false& key = apikey 例如纬度,经度 API键,并将传感器设置为false ,但始终显示为:

  {
debug_info:[],
html_attributions:[],
results:[],
status:REQUEST_DENIED
}

我已经搜索过那种错误,我发现部分帖子建议检查传感器值并检查 API密钥。我已经检查过它,并且还检查了 Google Maps API v3 的服务已启用。但没有任何作品适合我。我是新来的,我不明白我做错了什么,请帮助。

你正在使用http( s)用于调用Google API,您的html也在http(s)下托管。如果不尝试将google网址更改为http。



否则,其他所有东西都会看起来不错,因此我认为您可能想要再次检查您的api控制台,然后转到SERVICES并检查如果您的'Places API'已打开。



您也可以尝试将端口地址更改为443,以获取Places API的响应


I am currently working with Google Place API, I have a problem with it whenever I am going to access this link

https://maps.googleapis.com/maps/api/place/search/json?location=latitude,longitude&radius=1&sensor=false&key=apikey

with entering the information like latitude,longitude and API key and set sensor equal to false,but it always shows :

{
   "debug_info" : [],
   "html_attributions" : [],
   "results" : [],
   "status" : "REQUEST_DENIED"
}

I already searched for that kind of error and I saw that some of the post suggests to check sensor value and check the API key. I already checked it and also checked the service is enabled for Google Maps API v3. But nothing works for me. I am new to this, I don't get what I am doing wrong, Please help.

解决方案

You are using http(s) for calling Google API, is your html also hosted under http(s). If not try changing google url to http.

Otherwise every thing else kinda looks ok so that makes me think you might wanna check your api console again, go to SERVICES and check if your 'Places API' is turned ON.

You can also try changing the Port address to 443 to get response from Places API

这篇关于Google Place API - 始终返回此“状态” :“REQUEST_DENIED”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 20:54