# API for License from Licensed to Basic

**URL:** <https://devforum.zoom.us/t/api-for-license-from-licensed-to-basic/38658>\
**Category:** API and Webhooks\
**Created:** [December 17, 2020, 3:59pm UTC](https://devforum.zoom.us/t/api-for-license-from-licensed-to-basic/38658 "2020-12-17T15:59:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon7](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@brandon7](https://devforum.zoom.us/u/brandon7)\
**Post date:** [December 17, 2020, 3:59pm UTC](https://devforum.zoom.us/t/api-for-license-from-licensed-to-basic/38658/1 "2020-12-17T15:59:44Z")

</div>

\*Does anyone have any sample code for PHP for changing non admin users from licensed to basic?

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 18, 2020, 5:24pm UTC](https://devforum.zoom.us/t/api-for-license-from-licensed-to-basic/38658/2 "2020-12-18T17:24:31Z")

</div>

Hi @brandon7,

You can update a user’s license type (change from licensed to basic) using the `type` field under our Update User endpoint:

> **[Update a User - Users - Zoom API - API Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate)**
>
> Update information on a user's Zoom profile.
> Scopes: user:write:admin user:write
> 
> Rate Limit Label: Light
> 
> Authorization
> 
> Flow: authorizationCode
> 
> Auth...

Here is a sample code snippet in PHP/ext-curl:

```auto
<?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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [January 18, 2021, 3:24am UTC](https://devforum.zoom.us/t/api-for-license-from-licensed-to-basic/38658/3 "2021-01-18T03:24:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
