Office 365视频REST API张贴方法获取403禁止错误 [英] Office 365 video REST api post method getting 403 forbidden error

查看:148
本文介绍了Office 365视频REST API张贴方法获取403禁止错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi,

我正在尝试使用以下rest Api更新视频标题,但出现403禁止错误.

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 +"')

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});
       方法:"POST",
       网址:sUrl,
        dataType:"json",
       数据:JSONObject,
       标头:{
            "X-HTTP-Method":"MERGE",
            //接受":"application/json; odata = verbose",
            //"content-type":"application/json; odata = verbose",
            "X-RequestDigest":$("#__ REQUESTDIGEST").val()
            //"IF-MATCH":"*"
        },
       成功:onViewsUpdatesuccess,
       错误:onError
    });

var JSONObject = JSON.stringify({ '__metadata': { 'type': 'SP.Publishing.VideoItem' }, 'Title': 'New title'+videoID });
    $.ajax({
        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
    });

SaiRatna Avala

SaiRatna Avala

推荐答案

似乎是与许可相关的问题.请检查您是否拥有对该项目的访问权限.

Seems like this is permission related issue .  Please check you have contribute access to that item .

使用POSTMAN工具并尝试执行相同的操作,以便您了解它是否与权限问题或编码问题有关.

Use POSTMAN tool and try to do the same operation so that you will come to know whether it is related to Permission issue or coding issue .


这篇关于Office 365视频REST API张贴方法获取403禁止错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆