How to logout after obtaining refresh token for adwords api ?

30 views
Skip to first unread message

IntegrationDeveloper

unread,
Dec 12, 2016, 10:42:16 AM12/12/16
to AdWords API Forum
I used this string.Format to form the url successfully to obtain a refresh token to access adwords api :

     string body = string.Format("code={0}&client_id={1}&client_secret={2}&redirect_uri={3}&grant_type={4}", HttpUtility.UrlEncode(authorizationCode),
       HttpUtility.UrlEncode(_appConfig.OAuth2ClientId), HttpUtility.UrlEncode(_appConfig.OAuth2ClientSecret),
       HttpUtility.UrlEncode(_appConfig.OAuth2RedirectUri), HttpUtility.UrlEncode("authorization_code"));

I would like to log that user out afterward. What's the string.Format to logout programmatically? 

Thanks in advance.


Sreelakshmi Sasidharan (AdWords API Team)

unread,
Dec 12, 2016, 3:34:13 PM12/12/16
to AdWords API Forum
Hi, 

AdWords API calls are authorized through OAuth2 and that said, OAuth2 enables the API client application to access the AdWords account without having to manage the user's login info. There is no need to logout as by requesting a refresh token the API client application is not logging onto the account but getting a token which will help the application make calls to the AdWords API. The OAuth2 documentation might be helpful for a better understanding. 

The AdWords API does not have a method that can be used to logout the user.

Thanks,
Sreelakshmi Sasidharan, AdWords API Team
Reply all
Reply to author
Forward
0 new messages