Failed to exchange authorization code for access token.

69 views
Skip to first unread message

manisha tiwari

unread,
May 20, 2021, 1:10:56 AM5/20/21
to AdWords API and Google Ads API Forum
Hi Team,

I'm trying to build an Ad and Campaign for a Webapp using the Google's AdWorks API.
1. I created the OAuth 2.0 ClientID details using 'https://console.cloud.google.com/apis/'. 
2. I used the client details in the web.config of AdWords.Examples.CSharp.OAuth and tried the 'Authorize User' action on the 'AdWords API OAuth demo' page.

Issue: While trying the 'Authorize User' in step 2 above:
1. Refresh token got generated.
2. Error below occured for the access token: 
[Google.Api.Ads.Common.Lib.AdsOAuthException: 'Failed to exchange authorization code for access token.'].

Please advise on the resolution for above.


Google Ads API Forum Advisor Prod

unread,
May 20, 2021, 2:36:54 PM5/20/21
to manishat...@gmail.com, adwor...@googlegroups.com

Hi Manisha,

Thank you for reaching out. Could you please share the code and link you used to generate the OAuth2 credentials along with the complete request and response logs via the Reply privately to author option for us to further investigate?

Thanks and regards,
Xiaoming, Google Ads API Team


Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2HCJYP:ref
Reply all
Reply to author
Forward
Message has been deleted
0 new messages