我正在尝试使用Google Custom Search API 我跟着Custom Search doc,我完成了控制面板的工作,并获得了搜索引擎ID,IMplemented API并从开发者控制台获得了API密钥
公共API访问密钥 - AIzaSyC0m8w-NEP3yrKolboNbPLbhlhmHJc_cB0
搜索引擎ID - 005717290701474541337:1mc_u_r_i94
在做出上述要求后,我得到了这个结果
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. The API is not enabled for your project, or 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 configuration.",
"extendedHelp": "https://console.developers.google.com"
}
],
"code": 403,
"message": "Access Not Configured. The API is not enabled for your project, or 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 configuration."
}
}
我没有得到预期的结果,所以请帮忙.. 感谢
答案 0 :(得分:2)
一切似乎都没问题,它可能是API关键问题。 尝试为可能有效的浏览器创建API密钥