# Can't delete users from Zoom

**URL:** <https://devforum.zoom.us/t/cant-delete-users-from-zoom/66614>\
**Category:** API and Webhooks\
**Created:** [March 29, 2022, 9:46am UTC](https://devforum.zoom.us/t/cant-delete-users-from-zoom/66614 "2022-03-29T09:46:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomas.bjorklund](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tomas.bjorklund/32/36409_2.png) [@tomas.bjorklund](https://devforum.zoom.us/u/tomas.bjorklund)\
**Post date:** [March 29, 2022, 9:46am UTC](https://devforum.zoom.us/t/cant-delete-users-from-zoom/66614/1 "2022-03-29T09:46:21Z")

</div>

Hello I am trying to delete Zoom users with the help of Python and request.

```auto
api_key = ************
api_secret = *************
email = "test@test.com"

payload = {
'iss': api_key,
'exp': '1496091964000'
}

token = jwt.encode(payload, api_secret)
endpoint = "https://api.zoom.us/v2/users/" + email

data = {"action" : "delete"}

headers = {"Content-Type":"application/json", "Authorization":"Bearer "+ token}

zoom_r = requests.delete(endpoint, data=data, headers=headers)

print(zoom_r.text)
print(zoom_r.status_code)

```

I get the error {“code”:1107,“message”:“You can not disassociate a user with managed domain.”} when i try to run the script.

What do I change in my script to delete the user instead of disassociate the user?

---

<div class="post-metadata">

**Author:** ![tomas.bjorklund](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tomas.bjorklund/32/36409_2.png) [@tomas.bjorklund](https://devforum.zoom.us/u/tomas.bjorklund)\
**Post date:** [March 29, 2022, 11:12am UTC](https://devforum.zoom.us/t/cant-delete-users-from-zoom/66614/2 "2022-03-29T11:12:22Z")

</div>

I solved it by changing data=data to params=data

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [April 21, 2022, 8:57am UTC](https://devforum.zoom.us/t/cant-delete-users-from-zoom/66614/3 "2022-04-21T08:57:31Z")

</div>

Glad to hear you were able to resolve it, @tomas.bjorklund! Thank you for sharing this update with us!

Happy Coding,  
Donte

---

<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:** [May 21, 2022, 6:58pm UTC](https://devforum.zoom.us/t/cant-delete-users-from-zoom/66614/4 "2022-05-21T18:58:18Z")

</div>

Closed on May 21, 2022, 6:58pm UTC

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