0

如何使用 Google API Explorer?

https://developers.google.com/apis-explorer/#p/plusDomains/v1/plusDomains.people.get

我想测试 Google+ Domains API,甚至通过 API Explorer 我收到 403 错误:

{
 "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."
 }
}
4

1 回答 1

2

这是Google Developers Console中的应用设置问题。在凭证屏幕上,它列出了允许使用 API 密钥的 IP。这是一种安全预防措施,可在密钥泄漏时帮助保护密钥。 如图所示,

您需要将允许的 IP 编辑为空(不太安全)或更新它以包含服务器的实际 IP。 如图

于 2015-11-13T16:55:52.167 回答