I’m trying to create a simple folder on Box, but I’m having a hard time. I keep getting this error:
{“type”:”error”,”status”:404,”code”:”not_found”,”help_url”:”http://developers.box.com/docs/#errors”,”message”:”Not Found”,”request_id”:”71794126250a0c2f00fe35″}
here’s my code:
$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);
what is that i am missing.
Please help.
Thanks in advance.
As per BOX Docs