【发布时间】:2015-05-28 13:55:13
【问题描述】:
我使用这个作为我的请求网址:
`String isbnUrl = "https://www.googleapis.com/books/v1/volumes?q=isbn:" + isbn + "&key=" + myAPIKEY;`
谁能告诉我为什么我一直收到这个回复:
{
"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."
}
}
我已经完成了使用调试密钥库和发布密钥库为我的 Android 应用程序获取 API 的过程,但似乎无法使其正常工作Google Books API 403 Access Not Configured.
我以为这就是答案,但后来偶然意识到这与根本不提供钥匙是一样的。在输入错误的字符串作为键后,我意识到了这一点,它仍然有效。
在开发者控制台中,我看到它在使用响应代码部分收到来自我的 API 的请求:客户端错误 (4xx)。
如果有人想出如何通过包含密钥使该 API 以 Google 想要的方式工作,我将非常感谢任何帮助。
【问题讨论】:
标签: android google-api