{"[AuthenticationError.NOT_ADS_USER @ ; trigger:'<null>']"} while getting the existing campaigns

378 views
Skip to first unread message

Sarah N

unread,
Aug 21, 2015, 9:00:14 AM8/21/15
to AdWords API Forum
I'm trying to get access and refresh token in OAuth2 for GoogleAdWords:
I've done these steps before:

1)Create  manager Account 
2)Create developer Token from manager Account.
3)Create Test MCC account  
4)Use the Test MCC account for creating RefreshToken by running OAuthTokenGenerator.exe
5)Create AdWords account , and Use this account for creating ClientId and ClientSecret .

use these values in Web.config of my project.
but when I try to Get the campaigns with this code:
          //....
          page = campaignService.get(selector); 

it gets the error 
{"[AuthenticationError.NOT_ADS_USER @ ; trigger:'<null>']"}

I'm very new to GoogleAdwords , so maybe something I'm missing from setting  or sth else.
could anyone help me with that?



Umesh Dengale

unread,
Aug 21, 2015, 5:03:00 PM8/21/15
to AdWords API Forum
Hi Sarah,

You created refresh token before the creation of ClientId and ClientSecret key. You could recreate refresh token and call the API.

Thanks,
Umesh, AdWords API Team.

Sarah N

unread,
Aug 23, 2015, 7:55:08 PM8/23/15
to AdWords API Forum
Thanks Umesh, 
I 've just replace the existing refresh token with the new token created by Test MCC Account. and run again, 
the error is changed to this :
Failed to refresh access token.
{   "error" : "unauthorized_client" }

Sarah N

unread,
Aug 23, 2015, 9:55:54 PM8/23/15
to AdWords API Forum

Now , I just used the Client Library (.Net) for authentication , in "OAuth2ProviderBase" class we have these lines:

 protected string TOKEN_ENDPOINT = "https://accounts.google.com/o/oauth2/token";

//.....


 
WebRequest request = HttpWebRequest.Create(TOKEN_ENDPOINT);
   request
.Proxy = config.Proxy;
   request
.Method = "POST";
   request
.ContentType = "application/x-www-form-urlencoded";
//...


response
= request.GetResponse();


it gets Error 400 - Bad Request.

the body is look like this:
     client_id=XXX&client_secret=XXX&refresh_token=XXX&grant_type=refresh_token

Is this because of wrong URL? 





Umesh Dengale

unread,
Aug 24, 2015, 12:43:50 PM8/24/15
to AdWords API Forum
Hi Sarah,

Could you provide the SOAP XML request and response logs?  Just click Reply privately to author in the forum when responding. Don't forget to remove the developer token and client customer ID in the output.
Message has been deleted

Umesh Dengale

unread,
Jan 14, 2016, 1:44:55 PM1/14/16
to AdWords API Forum
Hi Sarah,

Thanks for providing the request and response logs. The NOT_ADS_USER error indicates that the login used to generate the access token is not associated with any AdWords account. The common reason may be the login information provided corresponds to a Google account that does not have AdWords enabled. Please make sure you log in with valid AdWords account(typically your manager account) for the OAuth flow.
Reply all
Reply to author
Forward
0 new messages