对于一个学校项目,我和我的伙伴正在使用一个使用 Microsoft Azure Video Indexer API 的网页,从上周开始一切正常,但现在我每次都出现这个错误。我以为是因为新年,因为它停止工作1 月 1 日。奇怪的是,相同的代码片段不再起作用了。例如,在 API 网站上提出的用于获取令牌的示例并没有
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
"allowEdit": "False",
};
$.ajax({
url: "https://api.videoindexer.ai/Auth/trial/Accounts/198UE0192/AccessToken?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("x-ms-client-request-id","");
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","108D193J");
},
type: "GET",
// Request body
data: "{body}",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
</body>
</html