authentication - Google shopping api Request had insufficient authentication scopes
问题描述
I make a request to Google shopping by curl:
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
and the response is
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"errors": [
{
"message": "Insufficient Permission",
"domain": "global",
"reason": "insufficientPermissions"
}
],
"status": "PERMISSION_DENIED"
}
}
I'm sure my access_token is right, but I'm not sure if my API_KEY is right. My API_KEY is gotten in https://console.cloud.google.com/apis/credentials , and the API_KEY's restrictions is none.
And my Content API for Shopping is enabled:
I wonder if I miss any critical method, that I can't request the api successfully.
By the way, how can I get my merchant_id? Is it my merchant_id?
But the method "Verify and claim your website URL in Business information", I didn't pass. Does it cause to the 403 error?
解决方案
推荐阅读
- swift - 使用未声明的类型 AppDelegate
- utf-8 - MimeMessage,电子邮件内容,字符集:utf-8
- mern - 如何在 React.js 中将二进制数据转换为图像?
- ios - 如何修改文本字段以使光标不被覆盖?
- r - 在 r 中绘制日期
- php - 如何将选定的微调器值传递给不同的 url
- django - Django ORM:按不同的列值选择行
- python - 没有这样的文件或目录:Anaconda 错误,python CSV 文件阅读器
- c# - ioptionmonitor 跟踪 appsettings 的变化
- node.js - 如何提供 base64 字符串作为图像?