# Alternative hosts validation before creating a meeting

**URL:** <https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027>\
**Category:** Meetings\
**Created:** [January 24, 2023, 3:17pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027 "2023-01-24T15:17:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitalyateventcadence](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vitalyateventcadence/32/51920_2.png) [@vitalyateventcadence](https://devforum.zoom.us/u/vitalyateventcadence)\
**Post date:** [January 24, 2023, 3:17pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/1 "2023-01-24T15:17:36Z")

</div>

Hello,

I have a question that is very similar to the one already asked :

> [@Zoom API - Create meeting for alternative host](https://devforum.zoom.us/t/zoom-api-create-meeting-for-alternative-host/40336):
>
> Hi everyone, We have the Zoom Create a Meeting API built into an Internal Tool but it appears we are running into an issue. We are populating the Alternative Host field in the configuration of the API with a list of users that have specific access to an Internal Site. It appears when a user is added with permissions to the site prior to being enabled for Zoom the API is failing to create a meeting. Same would happen for a user leaving the company and their account in Zoom is disabled prior to …

in our system, we need to schedule zoom meetings with alternative hosts. Meetings are created in the background without user UI and alternative hosts requested may or may not have a zoom account. The expected behavior here is meeting is scheduled always with as many valid alternative hosts as possible.

The only solution I see so far is we perform “getuser” call for every alternative host candidate. If the response contains the appropriate license — we add them, if not, we skip them. Is this the valid way or is there a better way here?

A separate question: meeting is created using a user token stored after oAuth. Do you predict any permission issues, could there be cases when users can’t load other users’ data due to permissions and, as result, the above approach will not work?

Thank you.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [January 24, 2023, 5:58pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/3 "2023-01-24T17:58:57Z")

</div>

Hi @vitalyateventcadence ,

> [@vitalyateventcadence](#):
>
> The only solution I see so far is we perform “getuser” call for every alternative host candidate. If the response contains the appropriate license — we add them, if not, we skip them. Is this the valid way or is there a better way here?

You can use [`List users`](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/users) and build out a filter `type` depending on the license you need.

> [@vitalyateventcadence](#):
>
> A separate question: meeting is created using a user token stored after oAuth. Do you predict any permission issues, could there be cases when users can’t load other users’ data due to permissions and, as result, the above approach will not work?

If a different user with lower-access permissions tries to query the API with a new token, they will not be able to access the endpoint info. Here are the scopes required:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/9/d9035bea7bb01601481b9da1f222982e5778718a.png)

---

<div class="post-metadata">

**Author:** ![vitalyateventcadence](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vitalyateventcadence/32/51920_2.png) [@vitalyateventcadence](https://devforum.zoom.us/u/vitalyateventcadence)\
**Post date:** [January 24, 2023, 6:24pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/4 "2023-01-24T18:24:13Z")

</div>

that is actually a bad news for me. We don’t request this scope, we don’t need it.  
What would be the best approach in this case, simply creating a meeting than updating it with adding alternative hosts one by one and remove those who failed ? Or is there other better ideas?

What we really need is the meeting to be always created and only those emails who have a valid account be alternative hosts, others to be simply excluded/ignored.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [January 24, 2023, 6:39pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/5 "2023-01-24T18:39:42Z")

</div>

Hi @vitalyateventcadence ,

> [@vitalyateventcadence](#):
>
> What would be the best approach in this case, simply creating a meeting than updating it with adding alternative hosts one by one and remove those who failed ? Or is there other better ideas?

This sounds like a time consuming approach, but if you manually create a list of hosts that work, then you would only need to do this process once in theory. The [`Get a User` endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/user) also requires the `user:read:admin` scope so it’s not a good alternative.

You could use the [`Create a Meeting`](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingCreate) and [`Update a Meeting`](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingUpdate) endpoints ( **Scopes:** `meeting:write:admin` , `meeting:write`) to set the alternative hosts.

[Here’s the article for creating alternative hosts](https://support.zoom.us/hc/en-us/articles/208220166-Designating-an-alternative-host) via the web portal if you do not have an OAuth app with the mentioned scopes and do not want to institute them.

> [@vitalyateventcadence](#):
>
> What we really need is the meeting to be always created and only those emails who have a valid account be alternative hosts, others to be simply excluded/ignored.

You can do this manually as I mentioned at the top of this response because to access this info programmatically via API, you’ll need those admin scopes in place.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![vitalyateventcadence](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vitalyateventcadence/32/51920_2.png) [@vitalyateventcadence](https://devforum.zoom.us/u/vitalyateventcadence)\
**Post date:** [January 25, 2023, 10:12am UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/6 "2023-01-25T10:12:37Z")

</div>

It is a question of hundreds if not thousand of meetings to create, with different variations of possible hosts. Unfortunately no manual approach is possible here. This leaves me no choice but to try adding them one by one… we will probably limit our service to have two alternative hosts at maximum or something.

For the future maybe you will want to consider expanding the API by adding a possibility to specify hosts and ignore those who are not eligible. It seems like it is being demanded from time to time.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [January 25, 2023, 6:25pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/7 "2023-01-25T18:25:33Z")

</div>

Hi @vitalyateventcadence ,

Thanks for sharing these thoughts.

> [@vitalyateventcadence](#):
>
> For the future maybe you will want to consider expanding the API by adding a possibility to specify hosts and ignore those who are not eligible. It seems like it is being demanded from time to time.

This action is programmatically possible if you use the aforementioned endpoints and filter by licensing type. It could be worth increasing your app scopes to use those endpoints. 🙂

---

<div class="post-metadata">

**Author:** ![alamgir000009](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alamgir000009/32/49978_2.png) [@alamgir000009](https://devforum.zoom.us/u/alamgir000009)\
**Post date:** [July 4, 2023, 12:55pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/8 "2023-07-04T12:55:10Z")

</div>

How add alternative\_hosts when creating meeting using api i am trying like “settings” =\> [  
“alternative\_hosts” =\> $alternativeHosts,  
], but it gives errors ?

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [July 6, 2023, 8:02pm UTC](https://devforum.zoom.us/t/alternative-hosts-validation-before-creating-a-meeting/82027/9 "2023-07-06T20:02:14Z")

</div>

Hi @alamgir000009 ,

What errors? Do those users have licensing that allow hosts? Does the user creating the meeting have permission to assign hosts?
