How to use api call inside kmc and html player

as in subject - i would like to get JSON config of the player in the kmc but i dont know how to do that. I guess an option is to call the API fuction get.uiConf.

i was trying to make the call from the generated code (from kaltura developers tab):

var cb = function (success, results){
if(!success)
alert(results);

if(results.code && results.message){
alert(results.message);
return;
}

handleResults(results);
};
var config = new KalturaConfiguration(partnerId);
config.serviceUrl = "http://mywebsite.com/";
var client = new KalturaClient(config);
var id = 123456;
var result = client.uiConf.get(cb, id);

unfortunatelly it throw an error on KalturaConfiguration - it can not see that class

One more question is there equivalent function to uiConf that is getting JSON instead?

Are you sure you include the js library by Kaltura, because definitely KalturaConfiguration exists
And in order to get the uiConf you will need to login.

thank you, managed to made the call different way

    var data = {};
    data.service = "uiconf";
    data.id = player.id;
    data.ks = kmc.vars.ks;
    data.action = "get";

    var baseUrl = window.location.protocol + "//" + window.location.host + "/api_v3/";

    $.ajax({
        type: "POST",
        url: baseUrl,
        data: data,
        success: function(val){
            console.log("uiConf: " + val);
        },
        dataType: "xml"
    });