異なるKintoneのドメイン間でRest APIを発行したいと思っています。
Kintone.proxyでは成功したのですが、同期で通信を行いたいためjQueryのAjaxを使用してみたのですが、下記エラーが発生しました。
何が間違っているかご教授頂ければと思います。
<エラー内容>
No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://xxx.cybozu.com’ is therefore not allowed access. The response had HTTP status code 401.
<ソース>
var APP_ID =NN;
var HEADERS = {
‘X-Cybozu-Authorization’: YYY,
‘Authorization’ : 'Basic ’ + ZZZ
};
var J
$.ajax({
url: URL + ‘/k/v1/app/views.json?app=’ + APP_ID,
type : ‘GET’,
headers: HEADERS,
async: false,
success: function(response) {
return response;
},
error: function(response){
return false;
}
});
*NNはアプリID
*YYY、ZZZはBase64で暗号化した認証情報
*Basic認証がかかっています。
以上、よろしくお願いします。