提问人:kelko 提问时间:10/14/2023 更新时间:10/14/2023 访问量:56
我在使用 Google 自定义搜索 API 时收到 403“调用方没有权限”错误,这是我以前从未收到过的
I am getting a 403 "The caller does not have permission" error when using the Google Custom Search API that I haven't gotten before
问:
当我调用 Google 自定义搜索 API 时,我收到以下错误:
{
"error": {
"code": 403,
"message": "The caller does not have permission",
"errors": [
{
"message": "The caller does not have permission",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
我以前多次使用过这个API,唯一的区别是我使用的是不同的Google云帐户和API密钥。我已经在我的 Google Cloud 项目中启用了自定义搜索 API,当我在 Google Cloud Console 中查看使用情况时,它显示 100% 错误,图表显示所有 403 个错误。我还启用了 Places API,它运行良好。为什么我会收到此错误?
我尝试设置 OAuth 同意屏幕,但我很确定这仅在我使用 OAuth 令牌而不是 API 密钥时才有意义,并且此 API 的文档仅告诉我如何使用 API 密钥。
答: 暂无答案
评论