Using ks in the URL

Hi,

Is it correct to use a KS user string in the URL to retrieve a video under KS access control. For example:

https://cdnapisec.kaltura.com/p/9999999/sp/9999999/playManifest/entryId/1_xxxxxxx/ks/djJ8MjI4ODY5MXxCWfJDSkrokaM5CweYhCHG1LTm3cS3c6QVD1QfFPFGHIaI-pJkP9wASIVIi94BEMChcvMpaJolEs-sLmkbSON/format/url/flavorParamId/301971/video.mp4

The KS, is the same KS that I m able to get with the SessionStart API function?

thanks

Lluís

Hi @lluisribes,

Yes, when a KS based access control profile is enabled for the entry, you should pass a KS to your playManifest request.
Privileges wise, a sview privilege should be enough, after all, you do not wish for someone to grab that KS and abuse it.
You can set the KS in the embed code, like so:

kWidget.embed(
        { "targetId": "kaltura_player", 
        "wid": "_$PARTNER_ID",
        "uiconf_id": $UI_CONF_ID, 
        "flashvars": { 
                "streamerType": "auto",
                "ks":"$SVIEW_KS"
        }, 
        "cache_st": 1521118124, 
        "entry_id": "$ENTRY_ID" 
        }
); 

All requests will then include the KS as a param.