Can't delete users from Zoom

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

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?

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

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

Happy Coding,
Donte

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