【问题标题】:Get 403 error message when using Google custom search API使用 Google 自定义搜索 API 时收到 403 错误消息
【发布时间】:2015-03-28 15:32:47
【问题描述】:

我在使用 Google custom search API 时收到此消息。我得到了API key(服务器和浏览器)和search ID

为什么它说usageLimits?限制是每天 100 次查询,但我运行程序的方式不到 100 次......

哪里出错了...请帮忙!!

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

【问题讨论】:

  • 我一直在想办法回答这个问题,而不是简单地重复信息,但我做不到。也许仔细阅读消息并查找您不理解的术语?

标签: json google-search-api


【解决方案1】:

我认为您的 API 密钥或 CX 参数可能有误。 转到自定义搜索引擎编辑器并重新复制值。

确保您已添加一些要搜索的网站。

尝试右侧窗格中的链接以测试您的自定义搜索引擎是否有效。

【讨论】:

    猜你喜欢
    • 2019-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多