# Apiを用いてユーザ削除を試みたところ、エラーが発生。

**URL:** <https://devforum.zoom.us/t/api/96488>\
**Category:** API and Webhooks\
**Created:** [October 10, 2023, 2:02am UTC](https://devforum.zoom.us/t/api/96488 "2023-10-10T02:02:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuta\_asano](https://avatars.discourse-cdn.com/v4/letter/y/a587f6/32.png) [@yuta\_asano](https://devforum.zoom.us/u/yuta_asano)\
**Post date:** [October 10, 2023, 2:02am UTC](https://devforum.zoom.us/t/api/96488/1 "2023-10-10T02:02:50Z")

</div>

▼質問背景

下記ユーザ削除APIを用いてユーザ削除を試みたところ、エラーが発生しました。  
エラーが発生したAPI Responseを確認すると、Zoom Eventsを公開しているユーザ削除を試みた場合に、転送先のユーザ（transfer\_email）を設定していなかったため、エラーが発生したようです。  
最終的に、ユーザ削除APIを実行してエラーが発生せず、問題なくユーザを削除できるようにしたいです。

ユーザ削除API  
Delete a user  
[Zoom Meeting API](https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/userDelete)

▼エラーのAPI Response  
Body：{“code”:300,“message”:“このユーザーはすでに Zoom Events でイベントを公開しており、あなたはデータの転送先ユーザーを指定していません。”}  
Status：400  
Error Code：1  
Error Message：Method failed: (/v2/users/NuHtij8IS-Gp2\_XmWt4GIA) with code: 400

▼質問事項

・質問１  
ユーザ削除APIのdocsを確認すると、ユーザーが Zoom Events / Session機能を持っている場合、QUERY-STRING PARAMETERSの「transfer\_email」を設定してAPI実行する必要があると記載がございます。  
つまり、「transfer\_email」を設定しない限り、Zoom EventsやZoom Sessionを利用しているユーザを削除できないという理解であっていますか？

・質問２  
質問１の回答として、「transfer\_email」を設定せずともZoom EventsやZoom Sessionを利用しているユーザをAPIで削除できる場合、その方法（API設定値など）を教えていただけますか？

・質問３  
Zoom EventsやZoom Sessionを利用できるユーザは、有償ライセンスが付与されているユーザのみという理解であっていますか？  
無償アカウントであっても同様の事象が発生するかどうかを確認したいです。

・質問４  
Zoom EventsやZoom Sessionを利用中のユーザをZoomのWeb管理画面から手動で削除する場合、  
有償ライセンスを外してからであれば、転送先のユーザ（transfer\_email）を設定しなくても削除できる認識です。  
また、有償ライセンスを外す場合も、転送先のユーザ（transfer\_email）の設定は不要である認識です。  
そのため、APIでユーザを削除する場合も、手動削除と同じ手順を使うことで、転送先のユーザ（transfer\_email）を設定することなくZoom EventsやZoom Sessionを利用中のユーザを削除できるのではないかと考えています。  
質問ですが、Zoom EventsやZoom Sessionを利用中のユーザから有償ライセンスを外す場合、「transfer\_email」を設定するなどの特別な考慮をしなくても、下記APIの「type」を更新するだけで有償ライセンスを外すことができるという理解であっていますか？

Update a user

> **[Zoom Meeting API](https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/userUpdate)**
>
> API Reference for /docs/api/rest/reference/zoom-api/methods

・質問５  
質問４で、Zoom EventsやZoom Sessionを利用中のユーザから有償ライセンスをAPIで外す場合に特別な考慮が必要という回答であれば、必要な設定（API設定値など）を教えていただけますか？

・質問６  
Zoom EventsやZoom Sessionを利用中のユーザをAPIで削除する場合、有償ライセンスを外してからユーザ削除APIを実行すれば、QUERY-STRING PARAMETERSの「transfer\_email」を設定しなくても  
対象のユーザをエラーなく削除できるという理解であっていますか？

・質問７  
Zoom EventsやZoom Sessionを利用中のユーザのように、単純に削除ができないユーザのパターンがあれば教えていただけますか？  
例えば、ウェビナーや会議の開催予定があるアカウントは削除できないなど、他にありましたら教えていただきたいです。

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [October 13, 2023, 5:56pm UTC](https://devforum.zoom.us/t/api/96488/3 "2023-10-13T17:56:10Z")

</div>

Hi,  
Thanks for reaching out to the Zoom Developer Forum.  
I am sorry, I do not speak/write Japanese, but I have used Google Translate to traduce your questions, and here are the answers for them:

1. Correct, if you want to delete users that have Zoom Events or Zoom Session, you MUST pass the query parameter transfer\_email in your request. It is a required field

2. You can not delete users using Zoom events or sessions feature without transfer\_email

3. Correct, to have Zoom Events or Sessions, you will need a specific license.  
Learn more about that here: [Plans & Pricing for Zoom Events and Webinars | Zoom](https://zoom.us/pricing/events)

4. You can remove any user via API, just make sure to pass the required query parameters in your request.

5. What you could do is UPDATE the user’s license using the Patch user endpoint to give the user a basic license first, using the following endpoint.

> **[Zoom Meeting API](https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/userUpdate)**
>
> API Reference for /docs/api/rest/reference/zoom-api/methods

Then call the DELETE endpoint and you won’t need to pass transfer\_email

1. Yes, I tested this behavior by first updating the user’s license to a Basic one and then removing the user without passing the “transfer\_email” in the request.

2. I am not aware of any other issues at the moment

Hope this helps!  
Elisa

---

<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:** [October 16, 2024, 9:33am UTC](https://devforum.zoom.us/t/api/96488/4 "2024-10-16T09:33:02Z")

</div>

Closed on October 16, 2024, 9:33am UTC

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