File Share Update API Issue

im trying to update permissions of a shared file with API, it works when i pass permissions=1, but it doesnt work and says, Shares need at least read when i try to update permissions=2

$data = array(
“permissions” => 1, // this works
“permissions” => 2, // this doesnt work it says, Shares need at least read permissions
);
$payload = json_encode($data);
$ch = curl_init();
$headers = array();
$headers = ‘Content-Type: application/json’;
$headers = ‘Ocs-Apirequest: true’;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $this->nc_url.‘ocs/v2.php/apps/files_sharing/api/v1/shares/123’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘PUT’);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_USERPWD, 'User:Password);
$result = curl_exec($ch);