*Does anyone have any sample code for PHP for changing non admin users from licensed to basic?
Hi @brandon7,
You can update a user’s license type (change from licensed to basic) using the type
field under our Update User endpoint:
Here is a sample code snippet in PHP/ext-curl:
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.zoom.us/v2/users/%7BuserId%7D",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "{\"type\":\"integer\"}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Hope this helps!
Will
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.