微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Google 购物 api 请求的身份验证范围不足

如何解决Google 购物 api 请求的身份验证范围不足

我通过 curl 向 Google 购物提出请求:

curl --request POST \
  'https://shoppingcontent.googleapis.com/content/v2.1/products/batch?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"entries":[]}' \
  --compressed

响应是

{
  "error": {
    "code": 403,"message": "Request had insufficient authentication scopes.","errors": [
      {
        "message": "Insufficient Permission","domain": "global","reason": "insufficientPermissions"
      }
    ],"status": "PERMISSION_DENIED"
  }
}

我确定我的 access_token 是正确的,但我不确定我的 API_KEY 是否正确。 我的 API_KEY 是在 https://console.cloud.google.com/apis/credentials获取的,而 API_KEY 的限制是 none。

enter image description here

并且我的 Content API for Shopping 已启用:

enter image description here

不知道是不是漏掉了什么关键的方法,导致无法成功请求api。

顺便说一下,我怎样才能获得我的merchant_id?是我的merchant_id吗?

enter image description here

但是“在商家信息中验证并声明您的网站网址”的方法,我没有通过。是否会导致 403 错误

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。