ADS API call error

29 views
Skip to first unread message

ye devean

unread,
Apr 1, 2024, 3:20:46 PM4/1/24
to Google Ads API and AdWords API Forum
I according to  google Ads api  implements

call  keywordPlanServiceClient.generateKeywordIdeas(requestBuilder.build())
 
response error:

  Headers: Metadata(content-type=application/grpc,www-authenticate=Bearer realm="https://accounts.google.com/", error="insufficient_scope", scope="https://www.googleapis.com/auth/adwords https://adwords.google.com/api/adwords https://adwords.google.com/api/adwords/ https://adwords.google.com/api/adwords/cm",date=Fri, 29 Mar 2024 09:54:02 GMT)


Where did I get a configuration error? I can't find the location of the error at present,please help me


Google Ads API Forum Advisor

unread,
Apr 2, 2024, 8:04:27 AM4/2/24
to deve...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

I could see that you are encountering the 'insufficient_scope' error.

Could you please provide confirmation on the below questions:
  • Are you encountering the scope error only with the generateKeywordIdeas or any other requests too?
  • Have you considered the Authorization scope before making the request?
  • While generating the Oauth credentials, have you included the scope for the project.  
In order to investigate your issue further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02s0OVo:ref" (ADR-00229482)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages