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(results.code && results.message){

var config = new KalturaConfiguration(partnerId);
config.serviceUrl = "";
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.ks = kmc.vars.ks;
    data.action = "get";

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

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