05-01-2023 12:06 AM
string clientId = "your client id";
string clientSecret = "your client secret";
string redirectUri = "KitchenSink://response/";
string scope = "webex:all";
var auth = new OAuthAuthenticator(clientId, clientSecret, scope, redirectUri);
// authCode(64 bits) can be extracted from url by loading auth.authorizationUrl with a WebBrowser
var webex = new Webex(auth);
auth?.Authorize(authCode, result =>
{
if (result.Success)
{
System.Console.WriteLine("authorize success!");
}
else
{
System.Console.WriteLine("authorize failed!");
}
});
1).in Above code it doesn't go inside result => {. .can anyone know how to do it?
2). If anyone have other ways to authorize in webex, plz suggest for c#
05-01-2023 09:43 AM
Just to note "webex:all" is not a valid scope: https://developer.webex.com/docs/integrations#scopes
05-01-2023 12:35 AM
That looks more like an issue with the OAuthAuthenticator library, best would be best to ask in a support forum by that supplier.. Or does it do some logging and you're seeing any Webex issue?
Some time ago, I build a GUI app. It was using a browser component for the OAuth flow, redirect uri was to a non-existing URL. The browser component had a special 404 error handler to catch up the URL and grab the code. Very hacky, but was working
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide