0

I'm trying to integrate skype for business with my app. I'm trying to get the status of the user on the other end based on sip id , and if the user is online I'm trying to trigger the desktop application from a button click in my web app.

Are the any api calls that enables this action ? Went through the documentation and could not find anything.

Here is what i have so far, this is just the registering part.

var skypeWidget = Class.create();
console.log("skype for business js loaded");
var skypeWidgetString = "<div class='sfb_widget'>Skype Widget<a onclick='somefunction()'>Open</a></div>"
jQuery(".requester-details").append(skypeWidgetString);

console.log(Skype);

var config = {
    apiKey: 'apikey', // SDK
    apiKeyCC: 'apikeycc' // SDK+UI
};

var Application;

Skype.initialize({ apiKey: config.apiKey }, function(api) {
    window.skypeWebAppCtor = api.application;
    window.skypeWebApp = new api.application();
    skypeSignIn();
    window.skypeWebApp.signInManager.state.changed(function(state) {
      console.log("in");
    });
}, function(err) {
    console.log(err);
    console.log("cannot load the SDK");
});


var skypeSignIn = function() {
    var client = new Skype.Web.Model.Application;
    client.signInManager.signIn({
        username: "username",
        password: "password"
    }).then(function() {
        alert('Logged in!');
    }, function(error) {
        alert(error);
    });

}

var somefunction(){
  //trigger desktop app here
 }

1 Answer 1

0

Try 'redirecting' to the 'link':

window.location = 'skype:some_skype_user?chat';

To use a variable in place of some_skype_user you need to concatenate it:

var skypename = 'skypeuser01';
window.location = 'skype:' + skypename + '?chat';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.