NOT_ADS_USER with OAuth web flow

53 views
Skip to first unread message

Dylan

unread,
Sep 13, 2022, 9:43:49 AM9/13/22
to Google Ads API and AdWords API Forum
Hi Team, 

We are getting a 401 response with an "authenticationError": "NOT_ADS_USER" when trying to listAccessibleCustomers. We are using the OAuth web flow and we see the call work for some of our users but not for others.

We have one user who ensures us that he has a working Google Ads account and yet we get the response mentioned above.

When we check his refresh token against https://www.googleapis.com/oauth2/v3/token we get a valid access token and the confirmation of the "https://www.googleapis.com/auth/adwords" scope as a response. 

The call not only fails on our Java backend, but also when we try it via postman to the following endpoint: https://googleads.googleapis.com/v11/customers:listAccessibleCustomers

Here's the response body of that call, which is identical to what we see in our Java backend: 
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED",
"details": [
{
"errors": [
{
"errorCode": {
"authenticationError": "NOT_ADS_USER"
},
"message": "User in the cookie is not a valid Ads user."
}
],
"requestId": "fHp6fvgWp3u627Da-Cv1uQ"
}
]
}
}

Any help is much appreciated! 
Dylan

Google Ads API Forum Advisor

unread,
Sep 13, 2022, 10:10:53 AM9/13/22
to dy...@spoticle.com, adwor...@googlegroups.com
Hi Dylan,

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

The NOT_ADS_USER error usually occurs when the login used to generate the access token is not associated with any Google Ads account.

Could you please confirm if you’ve indeed followed every step of the service account guide, specifically the prerequisites? If your service account has been correctly configured, please provide the complete request and response logs with request ID where you have encountered an error as well as the the user account/email address that you're trying to setup so I can better investigate your concern.

You may send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2eNrZU:ref

Dylan

unread,
Sep 13, 2022, 10:51:52 AM9/13/22
to Google Ads API and AdWords API Forum
Hi Nirmita, 

Thanks again for your reply! We just learned from our user that he was confused and had actually connected the wrong Google Account that didn't have access to any Google Ads Accounts. He switched his Google Account and now everything is fine. Sorry for this premature outreach. 

Have a great day,
Dylan

Reply all
Reply to author
Forward
0 new messages