Refresh Token vs //Refresh Token

108 views
Skip to first unread message

Julie Baioni

unread,
May 15, 2019, 7:05:25 AM5/15/19
to AdWords API and Google Ads API Forum
I am working on the API Google Adwords Demo. When I comment out the refresh token key, I can't authorize my login.  I try to run the get campaigns and the exception says "Failed to get campaigns. Exception says "Value cannot be null. Parameter name: Looks like your application is not configured to use OAuth2 properly. Required OAuth2 parameter RefreshToken is missing. You may run Common\\Utils\\OAuth2TokenGenerator.cs to generate a default OAuth2 configuration."  When I don't comment it out, I can use the authorize login but I get this exception when I run the get campaigns-"Failed to refresh access token. See inner exception for details.  Does anyone have a solution?

googleadsapi...@google.com

unread,
May 15, 2019, 3:25:54 PM5/15/19
to AdWords API and Google Ads API Forum
Hello Julie,

In order to make an API call you need all the properties mentioned here(Developer token, refresh token, client ID, client Secret and ClientCustomerId). It is obvious to throw the error when the refresh token is commented.

The error "Failed to refresh access token" means that your refreshToken is probably expired. There might be an issue with your OAuth2 Credentials. I would recommend to regenerate a new set of credentials by following this guide and update your Web.config file with the newly created credentials.

After this, you could retry making your service calls. If it still does not work, kindly provide the error logs using reply privately to the author option to investigate further.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Reply all
Reply to author
Forward
0 new messages