unauthorized 401

77 views
Skip to first unread message

ps...@us.nature.com

unread,
Mar 21, 2017, 4:39:18 AM3/21/17
to AdWords API Forum
Hi there,

I keep getting unauthorized (401) in my web application. Below response is returned every time:
<string>return code:  401
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;Unauthorized&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000"&gt;
&lt;H1&gt;Unauthorized&lt;/H1&gt;
&lt;H2&gt;Error 401&lt;/H2&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</string>
                <ns2:HttpErrorCode xmlns:ns2="http://xml.apache.org/axis/">401</ns2:HttpErrorCode>

I am sharing with you some troubleshooting that I did:
1. cross checked clientId and secret - Both are correct
2. created a new refresh token using GetRefreshToken.java and added that token to ads.properties

still I get same error, anything I missed while troubleshooting at my end?
Could you please suggest something?

Many Thanks

Peter Oliquino

unread,
Mar 21, 2017, 5:00:39 AM3/21/17
to AdWords API Forum
Hi,

Could you confirm if you generated the refreshToken and the OAuth2 credentials using the email address associated to your MCC? If not, please try to generate them once again using the correct email address. Let me know if this helps.

Best regards,
Peter
AdWords API Team

ps...@us.nature.com

unread,
Mar 21, 2017, 5:34:22 AM3/21/17
to AdWords API Forum
Hi Peter,

Yes I did created OAuth2 credentials using right google account.
Today I generated refresh token using GetRefreshToken.java, when I run this class it asked me to copy paste a url in browser,  after I put that url in a browser it asked to login and then I login to same google account that I have configured for outh2 credentials and same for which clientId & secret mentioned in ads.properties file.

Any of my account details you would like me to share with you?

Thanks

Peter Oliquino

unread,
Mar 21, 2017, 5:56:32 AM3/21/17
to AdWords API Forum
Hi Prathap,

Thank you for confirming. Please send to me your MCC customer ID and the email address you used as login to generate the OAuth credentials in order to help me better look into your issue. Also, if you have tried making a call to any AdWords API services, could you also send the generated SOAP request and response that may also contain additional information about the issue you are currently facing? Please send your reply via Reply privately to author.

Thanks and regards,
Peter
AdWords API Team
Message has been deleted

ps...@us.nature.com

unread,
Mar 21, 2017, 7:18:29 AM3/21/17
to AdWords API Forum
Hi Peter,

I have sent you details. Please check.

Thanks
Message has been deleted

ps...@us.nature.com

unread,
Mar 21, 2017, 1:39:05 PM3/21/17
to AdWords API Forum
Hi Peter,

Any update on this?

Thanks
Reply all
Reply to author
Forward
0 new messages