Issue with authenticating service account using OAUTH2 but getting error mentioning NOT_ADS_USER.

52 views
Skip to first unread message

Sandeep Yadav

unread,
Jul 22, 2021, 1:52:31 AM7/22/21
to AdWords API and Google Ads API Forum

Hi Team,

This is regarding Google Ads API setup using a service account. We are trying to generate report for Google Ads using API and service account. We have followed the steps provided in Google Ads Documentation (https://developers.google.com/google-ads/api/docs/oauth/service-accounts#prerequisites). As part of this, we have complete below steps

  1. We have got created our Google workspace for our domain herhseys.com.
  2. We have a project and a service account created in our GCP console.
  3. We have got domain wide delegation enabled for the service account.
  4. Then we have added Ads API endpoint in scope of service account.
  5. Got google ads API enabled in console.
  6. Created a Developer token and changed the access level to BASIC for production.

 

Now we are trying to authenticate it using OAUTH2 but we are getting an error mentioning NOT_ADS_USER. Can you please help us to complete this authentication?

Anum Hassan

unread,
Aug 11, 2021, 12:50:59 PM8/11/21
to AdWords API and Google Ads API Forum
Hi I have also followed the instructions given here: https://developers.google.com/google-ads/api/docs/oauth/service-accounts
I get this error
Request made: ClientCustomerId: XXXXXX, Host: googleads.googleapis.com, Method: /google.ads.googleads.v8.services.GoogleAdsService/SearchStream, RequestId: AvnVm6qwMXC0sIzgD-T_Cw, IsFault: True, FaultMessage: User in the cookie is not a valid Ads user.

Did your error resolve?
Please help!

Google Ads API Forum Advisor

unread,
Aug 12, 2021, 5:21:05 AM8/12/21
to anum.ha...@gmail.com, adwor...@googlegroups.com

Hi Anum,

Thanks for reaching out to us.

Could you please confirm if you’ve indeed followed every step of the service account guide, specifically the prerequisites? If you’ve followed said guide and performed correctly and still have the same issue, I recommend you to reach out to the API Console team via this link, so their team can guide you through required authentication and credentials verification with regards to service accounts.

Kindly note that, we strongly recommend using OAuth2 installed app or web flows instead of service accounts unless you need domain-specific features (for example, impersonation). OAuth2 installed application and web flows require user interaction only once, when access to the account is granted. You need to implement the code set up on your end to make calls using service accounts. 

Let us know if you have any further questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 


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