error in first api call

39 views
Skip to first unread message

advisor.m...@gmail.com

unread,
Aug 6, 2018, 3:15:25 AM8/6/18
to AdWords API and Google Ads API Forum

I've inherited a google adwords project which is using OAuth 2.0 for Installed Applications to connect to the google adwords API.

I'm falling over on the first hurdle; I've downloaded the following example project from github;

https://github.com/googleads/googleads-dotnet-lib/tree/master/examples/AdWords/CSharp/OAuth

When I place all the details into the web.config as directed it doesn't work. I've put in;

  • the developer token
  • the customer Id
  • OAuth2ClientId
  • OAuth2ClientSecret

  • This is all brand new to me

screengrab of the sample app



The above image shows the sample app interface, when I click on the "Get campaigns" link receive an exception message; that says "Failed to get campaigns. Exception says "Failed to refresh access token. See inner exception for details."


Could someone offer any further?

advisor managers

unread,
Aug 6, 2018, 3:19:13 AM8/6/18
to adwor...@googlegroups.com

Peter Oliquino (AdWords API Team)

unread,
Aug 6, 2018, 3:55:06 AM8/6/18
to AdWords API and Google Ads API Forum
Hi,

Could you confirm if you also provided the refreshToken in the properties file? If you are unable to find the refreshToken, you may just generate a new one by referring to this guide. I hope this helps and feel free to write back should the issue persist.

Thanks and regards,
Peter
AdWords API Team

Dinesh S

unread,
Aug 20, 2018, 3:08:28 PM8/20/18
to AdWords API and Google Ads API Forum
Hi Peter,

Am also getting the same error. I have generated refresh token and included it in webconfig file. Can you please guide me to make it work?

Regards,
Dinesh S

Peter Oliquino (AdWords API Team)

unread,
Aug 21, 2018, 12:11:33 AM8/21/18
to AdWords API and Google Ads API Forum
Hi Dinesh,

Could you try and generate a new refreshToken and see if the issue persists?

Thanks and regards,
Peter
AdWords API Team

Reply all
Reply to author
Forward
0 new messages