I am trying to update a video title using below rest Api but I'm getting 403 forbidden error.

https://xxxxxxxxx.sharepoint.com/portals/hub/_api/VideoService/Channels('" + channelID + "')/Videos('" + videoID + "')
var JSONObject = JSON.stringify({ '__metadata': { 'type': 'SP.Publishing.VideoItem' }, 'Title': 'New title'+videoID });
        method: "POST",
        url: sUrl,
        dataType: 'json',
        data: JSONObject,
        headers: {
            "X-HTTP-Method": "MERGE",
            //"accept": "application/json;odata=verbose",
            //"content-type": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val()
            //"IF-MATCH": "*"
        success: onViewsUpdatesuccess,
        error: onError

2 Answers 2


You will need Azure access token. Which can be obtained as below

function GetAzureMediaAccessToken(spVideoUrl) {

    var deferred = $.Deferred();

    var executor = new SP.RequestExecutor(_spPageContextInfo.webAbsoluteUrl);


        url: "https://tenant.sharepoint.com/portals/hub/_api/VideoService/GetVideoByUrl('" + spVideoUrl + "')/GetStreamingKeyAccessToken",

        method: "GET",

        headers: {

            "Accept": "application/json; odata=nometadata"


        success: function(data) {



        error: function(data, errorCode, errorMessage) {

            deferred.reject(data, errorCode, errorMessage);



    return deferred.promise();


For entire code you can refer below



I think you need to get the form digest of the video portal first. I found this complete code example that uses the video chunking api


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.