Auth issue with service account

82 views
Skip to first unread message

Arnold

unread,
Feb 21, 2022, 5:23:07 AM2/21/22
to Google Ads API and AdWords API Forum
Hello,

I'm trying to authenticate to the Google Ads API with a service account.

But I have this error:

 errors {
  error_code {
    authentication_error: NOT_ADS_USER
  }
  message: "User in the cookie is not a valid Ads user."


I followed these steps :

- Get a dev token and create a test account
- Use php google library
- Create service account (get the JSON file)
- Delegate domain-wide authority with scope (https://www.googleapis.com/auth/adwords)

The user who had generated the dev token is an admin in our google ads account.

As soon as I try to make a request with the production or test customer id I get this error.

Thanks for your help.

Google Ads API Forum Advisor

unread,
Feb 21, 2022, 11:52:24 PM2/21/22
to arnaud...@fizzup.com, adwor...@googlegroups.com
Hi Arnold,

Thank you for reaching out.

The NOT_ADS_USER usually indicates that the OAuth2 credentials being used to authenticate your API requests were generated by a user / email address that is not associated to any Google Ads account. That being said, could you confirm whether the last item in this prerequisites section was also met by your current setup?
  • A Google Ads user with permissions on the Google Ads account you want to access. Google Ads does not support using service accounts without impersonation.
Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Wxb8E:ref

Arnold

unread,
Mar 29, 2022, 3:19:47 AM3/29/22
to Google Ads API and AdWords API Forum
Unfortunately it doesn't works and the OAuth2 credentials were generated by our Google Ads account admin : (

Google Ads API Forum Advisor

unread,
Mar 29, 2022, 3:39:32 PM3/29/22
to arnaud...@fizzup.com, adwor...@googlegroups.com
Hi Arnold,

Could you turn on logging with log level set to 'DEBUG' and send us privately a log of an API call that returns this error, combined with a copy of your google_ads_php.ini file or configuration setup?

Regards,

Google Logo
Aryeh
Google Ads API Team
 


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