问题描述
我通过 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。
并且我的 Content API for Shopping 已启用:
不知道是不是漏掉了什么关键的方法,导致无法成功请求api。
顺便说一下,我怎样才能获得我的merchant_id?是我的merchant_id吗?
但是“在商家信息中验证并声明您的网站网址”的方法,我没有通过。是否会导致 403 错误?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)