How to get refresh Token after Consent is given ?

15 views
Skip to first unread message

Atif ..

unread,
Feb 18, 2020, 9:23:10 AM2/18/20
to AdWords API and Google Ads API Forum
I am working in C# .NET
I have authenticated my app for consent and i have received refresh token.  Then i am creating my user by providing client id, secret and refresh token. 

AdWordsUser user = new AdWordsUser();
                user.Config.OAuth2ClientSecret = "xxxxxxxxxxxxxxxxxxxxxxxx";
                user.Config.OAuth2RefreshToken = "xxxxxxxxxxxxxxxxxxx";
                user.Config.OAuth2Mode = Google.Api.Ads.Common.Lib.OAuth2Flow.APPLICATION;

When i am sending this user object to  call functions functions through API, i am getting error "Failed to refresh Access Token".
Where i can find this access token and where i have to provide it ?  
Please guide. 
Thanks. 

Google Ads API Forum Advisor Prod

unread,
Feb 18, 2020, 2:29:50 PM2/18/20
to fit...@gmail.com, adwor...@googlegroups.com

Hello Atif,

Thank you for reaching out. Please refer to this guide for the steps to be followed while making an API call using C# client libraries. This will guide you to generate and specify the credentials correctly in your config file. The error "Failed to refresh Access Token" is observed when your refresh token is probably expired. There is likely an issue with your OAuth Credentials. Could you please try to generate a new set of credentials by following this guide and see if that fixes the issue? If you are still having an issue, please provide the complete request and response logs along with the email address used to generate the credentials using Reply privately to author so that I can further investigate the issue.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UV1Nui:ref
Reply all
Reply to author
Forward
0 new messages