Google Ads API Insufficient authentication scopes error

1,790 views
Skip to first unread message

Sriram Sivaraman

unread,
Jun 19, 2021, 1:00:54 PM6/19/21
to AdWords API and Google Ads API Forum
Hello, I am trying to use the Google Ads API to try and get reports from Google ADs.
I am using the code similar to this.
I also have a basic access to the Google Ads Account.
Everytime I run the script to get reports I get the following error. 
status = StatusCode.PERMISSION_DENIED
"Request had insufficient authentication scopes.","grpc_status":7

I have also turned the Google Ads Scope in Google Cloud but still getting the same error.
Can someone please help me with this?
Regards,
Sriram

Daniel Chen

unread,
Jun 20, 2021, 9:14:02 AM6/20/21
to sriram.s...@topcompare.be, AdWords API and Google Ads API Forum
Hi Sriram, 

Are you using restful API or client libraries?
I have tried the restful API and get the reports successfully.
Some notes might be helpful for you:
1) The clientCustomerId is a long value, not a string, without "-"
2) Need to pass the login-customer-id=6642246847 if the account is marin mcc account.
3) Access token has a prefix "Bearer "

Thanks,
Daniel

Sriram Sivaraman <sriram.s...@topcompare.be> 于2021年6月20日周日 上午1:01写道:
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/76f5186a-be84-41ee-8d19-90aa5a7a6463n%40googlegroups.com.

Google Ads API Forum Advisor

unread,
Jun 22, 2021, 3:11:08 PM6/22/21
to adwor...@googlegroups.com, sriram.s...@topcompare.be
Hello,

Thanks for reaching out. The PERMISSION_DENIED error is usually due to one of the following:
  • you are authenticating as a manager, but did not specify that manager account ID in the login-customer-ID in the request header
  • the email used to create the OAuth credentials does not have the requisite access level in the target Ads account
Please check for the above and let us know if you have any further questions.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ix78O:ref
Reply all
Reply to author
Forward
0 new messages