Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

curl - 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. enter image description here

And my Content API for Shopping is enabled: enter image description here

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? enter image description here

But the method "Verify and claim your website URL in Business information", I didn't pass. Does it cause to the 403 error?

question from:https://stackoverflow.com/questions/65919620/google-shopping-api-request-had-insufficient-authentication-scopes

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...