Google UrlShortener"ipRefererBlocked"

Kev*_*ltz 9 google-api azure google-url-shortener

我在Azure上托管了一个站点,其中阻止了对Google UrlShortner API的调用.我收到错误:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "ipRefererBlocked",
    "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
    "extendedHelp": "https://console.developers.google.com"
   }
  ],
  "code": 403,
  "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
 }
}
Run Code Online (Sandbox Code Playgroud)

API在本地运行良好,我已将ip地址添加到开发人员控制台中的API项目凭据.这似乎是Azure的一个问题,但我没有看到任何人有答案.

任何建议都会很棒!

Kev*_*ltz 1

即使使用静态IP,我也无法解决这个问题。解决方法是tinyUrl。他们的 api 运行完美。