我正在尝试在 Box 上创建一个简单的文件夹,但我遇到了困难。我不断收到此错误:
{"type":"error","status":404,"code":"not_found","help_url":"http://developers.box.com/docs/#errors","message":"不是找到","request_id":"71794126250a0c2f00fe35"}
这是我的代码:
$parent = array();
$parent['id'] = '0';
$params = array();
$params['name'] = 'Testfolder';
$params['parent'] = $parent;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.box.com/2.0/folders");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: BoxAuth api_key={myAPIkey}&auth_token={myToken}"));
$result = curl_exec($ch);
curl_close($ch);
print_r($result);
我错过了什么。请帮忙。提前致谢。