cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1231
Views
0
Helpful
2
Replies

How to authorize webex c# application

dsign228
Level 1
Level 1

 

 

 

 

 

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#  

 

2 Replies 2

dstaudt
Cisco Employee
Cisco Employee

Just to note "webex:all" is not a valid scope: https://developer.webex.com/docs/integrations#scopes

dtibbe
VIP
VIP

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