0
我使用這個PHP類box.com https://github.com/golchha21/BoxPHPAPIBox.com共享鏈接文件夾
我已經作出了自己的功能共享文件夾這樣
public function share_folder($folder_id) {
$url = $this->build_url("/folders/".$folder_id);
$params = array('shared_link' => array('access' => 'open', 'permissions' =>
array('can_download' => 'true', 'can_preview' => 'true')));
return json_decode($this->post($url, json_encode($params)), true);
}
我有與此帖相同的問題。 Access denied error message when trying to create a shared link to a folder in Box
有沒有人有此修復或知道爲什麼會發生?
更新
我想通了:
public function share_folder($folder_id) {
$url = $this->build_url("/folders/".$folder_id);
$params = array('shared_link' => array('access' => 'open', 'permissions' =>
array('can_download' => true, 'can_preview' => true)));
return json_decode($this->put($url, $params), true);
我必須改變它把脫下的json_encode
希望這有助於別人