I am trying to get a download link of a file, but getting this error: invalid value 4.
{"type":"error","status":400,"code":"bad_request","context_info":{"errors":[{"reason":"invalid_parameter","name":"file_version_id","message":"Invalid value '4'."}]},"help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Bad Request","request_id":"48y8omgyw5auncay"}
here is my code sniped:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.box.com/2.0/files/" . $fileId . "/content?version=4");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: Bearer " . $accessToken
));
// Receive server response ...
$server_output = curl_exec($ch);
$downloadDetails = json_decode($server_output);
curl_close($ch);
Not getting any idea why i am getting this. Can anyone help me out?