我正在使用 javascript 编写 box api 我发现了以下链接:http: //developers.blog.box.com/2011/09/28/using-the-box-api-with-javascript/ 它解释了如何做吧,我写道:
$.getJSON("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%20%3D%20'https%3A%2F%2Fwww.box.net%2Fapi%2F1.0%2Frest%3Faction%3Dget_ticket%26api_key%3D" + api_key + "'&format=json&diagnostics=true",
function (response) {
window.ticket = response.query.results.response.ticket;
window.location.href = 'https://m.box.net/api/1.0/auth/' + ticket;
但我收到“400 错误请求......为什么?