Re: API responds with 403 on one machine and not on others

219 views
Skip to first unread message

Jason Stedman

unread,
Apr 1, 2013, 1:28:36 PM4/1/13
to adwor...@googlegroups.com

Jonathan,

Any chance the machine with the issue is configured to use a proxy or is behind a hardware firewall of some kind?

Jason

Jonathan Wu

unread,
Apr 2, 2013, 1:24:43 PM4/2/13
to adwor...@googlegroups.com
Nope. We actually have access to numerous client accounts. This particular account is the only one with an issue on that machine. 
I at first thought that the account wasn't fully authorized for API access, but then I tried it in my local dev environment and it worked.

Anash P. Oommen (AdWords API Team)

unread,
Apr 3, 2013, 6:24:51 AM4/3/13
to adwor...@googlegroups.com
Hi Jonathan,

It could be that Google ClientLogin servers are seeing programmatic login from this machine for the first time and blocking your request. Open a browser on this machine, and login to your account and see if it solves the issue. If your machine is indeed blocked by ClientLogin, then you will be prompted to verify once you login to your account.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Thursday, March 28, 2013 12:07:45 AM UTC+5:30, Jonathan Wu wrote:
Hello,

We have an account (327-036-4904) where we get a 403 response when generating a client login token on one machine, but not on another. Is there any reason for this happening?


here is the root cause in the Java stacktrace:

Caused by: com.google.api.client.googleapis.auth.clientlogin.ClientLoginResponseException: 403 Forbidden
com.google.api.client.googleapis.auth.clientlogin.ClientLogin$ErrorInfo@71b9dd
        at com.google.api.client.googleapis.auth.clientlogin.ClientLogin.authenticate(ClientLogin.java:190)
        at com.google.api.ads.common.lib.auth.ClientLogin.requestToken(ClientLogin.java:119)
        at com.google.api.ads.common.lib.auth.ClientLoginTokens.requestToken(ClientLoginTokens.java:390)
        at com.datapop.api.adwords.AdwordsClient.generateClientLoginToken(AdwordsClient.java:80)

Jonathan Wu

unread,
Apr 3, 2013, 1:32:59 PM4/3/13
to adwordsapia...@google.com, adwor...@googlegroups.com
This is on a headless linux server. We've never had this issue with any other account we have API access to on this machine and further, it doesn't make sense that we would have to do this per machine per account. This machine is using the API to do things like grab Campaign data using the CampaignService.


Regards,
Jonathan Wu


--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords 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 a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/P2_Hs2a1PPU/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kevin Winter (AdWords API Team)

unread,
Apr 15, 2013, 10:45:22 AM4/15/13
to adwor...@googlegroups.com, adwordsapia...@google.com
This is part of standard risk detection.  The IP address your server uses to access ClientLogin is different from the IPs that the account normally logs in as (which is what it looks like when someone has compromised the account).  As a result you'll get the 403.  You can use the CAPTCHA unlock to "whitelist" your server, or you can move to OAuth2 which won't have these issues.

- Kevin Winter
AdWords API Team

Jonathan Wu

unread,
May 14, 2013, 2:04:35 PM5/14/13
to adwor...@googlegroups.com, adwordsapia...@google.com
Is there any documentation on how to do the "CAPTCHA  unlock"? I can't find it anywhere.

Anash P. Oommen (AdWords API Team)

unread,
May 14, 2013, 8:52:00 PM5/14/13
to adwor...@googlegroups.com, adwordsapia...@google.com
Hi Jonathan,

You can navigate to your account on a browser to https://accounts.google.com/DisplayUnlockCaptcha. See https://support.google.com/accounts/answer/2461835?hl=en for details.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Jonathan Wu

unread,
May 15, 2013, 1:22:01 AM5/15/13
to adwor...@googlegroups.com, adwordsapia...@google.com
Thanks fixed it. Thanks!
Reply all
Reply to author
Forward
0 new messages