Problem with PUT on API


i try to update the user quota over an PHP Client:


$ch = curl_init(‘https://user:pass@server/ocs/v1.php/cloud/users/username’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
curl_setopt($ch, CURLOPT_PUT, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
“OCS-APIRequest: true”,
“Content-Type: application/x-www-form-urlencoded”,


$response = curl_exec($ch);

I got this response:

<?xml version="1.0"?> failure 998 Invalid query, please check the syntax. API specifications are here:

Over an plain CURL Command it works.