Error 1107 when trying to delete user with api

Description
Hi all,

I’ve been working on some python functions to manage our zoom users but I’m running into an issue with the delete user function in the api.
It seems like it always tries to disassociate the user instead of deleting them, even if I set the payload to action : delete.
I can delete users from the web interface without any problems.

Does anyone have an idea of what’s going wrong here?

Thanks!
Error
{“code”:1107,“message”:“You can not disassociate a user with managed domain.”}

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT

Which Endpoint/s?
https://api.zoom.us/v2/users/

Code used
def remove_zoom_user(userid):
url = “https://api.zoom.us/v2/users/” + userid
payload = “{“action”:“delete”}”
response = requests.request(“DELETE”, url, json=payload, headers=headers)
return response.text

Hi @mvaneecke,

Can you please make sure that you’re passing the action parameter in the request URL, rather than in the body? This should resolve the issue:

Thanks!
Will

Hi Will,

Thanks so much for your reply!
Seems like every time I visited that page while debugging I missed the “query” keyword.
Solved!

Best,
Mattias

Awesome, glad that did the trick!