使用API​​限制时Google地图api REQUEST_DENIED&键 [英] Google maps api REQUEST_DENIED when using API restrictions & key

查看:165
本文介绍了使用API​​限制时Google地图api REQUEST_DENIED&键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几年来,我一直很开心地使用地图上的地理编码API,没有任何问题。最近我为不同的环境制作了更多的关键字,并决定向它们添加API限制是个好主意。

当我添加这些API限制时,我突然开始获得REQUEST_DENIED。

  https://maps.googleapis.com/maps/api/geocode/json?latlng& {lt},{ ln}& key = {key} 

此IP,网站或移动应用程序未被授权使用此API密钥,...
REQUEST_DENIED

删除 允许再次调用API。






这是密钥的设置。我们只启用了2个API,并且它们都被添加到此密钥中。在这种配置中,我无法调用Geocoding API。当我删除键再次运行时,没有问题。我还没有设置任何其他应用限制。




解决方案

Google现在意识到这个错误,并在公开问题追踪器中报告:



请将错误加入主题以添加您的投票并订阅来自Google的通知。希望他们能尽快解决这个问题。


I have been happily using the Geocoding API from Maps for some years, with no problem. Recently I've made more keys, for different environments, and decided it would be a good idea to add API restrictions to them.

When I add these API restrictions, I suddenly start getting REQUEST_DENIED.

https://maps.googleapis.com/maps/api/geocode/json?latlng=={lt},{ln}&key={key}

This IP, site or mobile application is not authorized to use this API key, ...
REQUEST_DENIED

Removing them allows the APIs to be called again.


This is the setup for the keys. We only have 2 APIs enabled, and they are both added to this key. In this configuration I can't call the Geocoding API. When I delete the restrictions the Key works again, no problem. I've not set up any other app restrictions.


解决方案

Google is now aware of the bug and it was reported in the public issue tracker:

https://issuetracker.google.com/issues/69715011

Please star the bug to add your vote and subscribe to notifications from Google. Hopefully they will fix the issue soon.

这篇关于使用API​​限制时Google地图api REQUEST_DENIED&键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆