Forum Discussion

NWC_GTW_Admin's avatar
NWC_GTW_Admin
Active Contributor
2 years ago

How to handle multiple accounts using GoToWebinar API

We are using GoToWebinar API to download Webinar Data.
Desktop Application developed using vb.net and using the .NET SDK (https://developer.goto.com/guides/SDKs/03_NET-SDK/) related help to connect using OAuth2Api.
We can download data from one GoToWebinar Account by getting the Access Token.

 

--------

clientId = "forAccount1ID"

clientSecrete = "forAccount1Pwd"

var oauth2Api = new OAuth2Api(clientId, clientSecret);

string authUrl = oauth2Api.GetOAuth2AuthorisationUrl();

....

....

--------

/* using a WinForms WebBrowser implementation */

void webBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e)

{

string responseKey = oauth2Api.GetResponseKey(e.Url); // => " ******** "

var tokenResponse = oauth2Api.GetAccessTokenResponse(responseKey);

var accessToken = tokenResponse.access_token; // => " ******** "

}

--------

 

We are not getting the proper token when we use different clientId for our 2nd Account.
Is there any method to revoke or terminate the earlier OAuth session ?