cURL PUT Request with Nextcloud / owncloud API
问题 I tried to update an existing Nextcloud user through their API. When I do it directly via shell it works curl -u user:pass -X PUT "https://example.org/ocs/v1.php/cloud/users/admin" -H "OCS-APIRequest: true" -d key="quota" -d value="5GB" But when I try to do it via PHP with the following code it always returns "failure 997" $url = 'https://' . $ownAdminname . ':' . $ownAdminpassword . '@example.org/ocs/v1.php/cloud/users/admin'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST,