# Calling REST API Subsites from Main?

**URL:** <https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278>\
**Category:** API and Webhooks\
**Tags:** webhooks, api\
**Created:** [July 24, 2024, 11:32am UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278 "2024-07-24T11:32:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.lai](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@m.lai](https://devforum.zoom.us/u/m.lai)\
**Post date:** [July 24, 2024, 11:32am UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/1 "2024-07-24T11:32:05Z")

</div>

We have a bunch of subsites. However when calling, the data returned only retrieves from the main tenant and does not include the subsites.

Is there away that I can include all the sub’s?. The work around as I can see is to create an app for each site which is not very efficient.

I’m using an ‘account-level app | Server-To-Service OAuth’ invoke-restmethod which calls the app account from the main.

[https://zoom.us/oauth/token?grant\_type=account\_credentials&account\_id=${accountId}](https://zoom.us/oauth/token?grant_type=account_credentials&account_id=$%7BaccountId%7D)

Thanks All.

---

<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:** [July 24, 2024, 2:20pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/2 "2024-07-24T14:20:11Z")

</div>

Hi @m.lai  
Thanks for reaching out to us and welcome to our Zoom Developer Forum.  
What do you mean when you say subsites? do you have a master account and then sub accounts?

---

<div class="post-metadata">

**Author:** ![m.lai](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@m.lai](https://devforum.zoom.us/u/m.lai)\
**Post date:** [July 24, 2024, 2:30pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/3 "2024-07-24T14:30:53Z")

</div>

Hi @elisa.zoom

Correct, sorry the correct term is Sub Account List.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/2/d26028cc9af6082565e3413226c4ba5ee734dcab.png)

---

<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:** [July 24, 2024, 3:46pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/4 "2024-07-24T15:46:14Z")

</div>

Ah I see @m.lai  
Can you specify what endpoints are you calling please?

---

<div class="post-metadata">

**Author:** ![m.lai](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@m.lai](https://devforum.zoom.us/u/m.lai)\
**Post date:** [July 24, 2024, 4:02pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/5 "2024-07-24T16:02:50Z")

</div>

[https://zoom.us/oauth/token?grant\_type=account\_credentials&account\_id=${accountId}](https://zoom.us/oauth/token?grant_type=account_credentials&account_id=$%7BaccountId%7D)

The account ID provided with the App

[https://api.zoom.us/v2/users](https://api.zoom.us/v2/users)

---

<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:** [July 24, 2024, 4:53pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/6 "2024-07-24T16:53:04Z")

</div>

Hi @m.lai  
to get a list of your subaccount you should be using the Master account API endpoints

> **[Zoom Account Master API](https://developers.zoom.us/docs/api/rest/reference/account/ma/#tag/Accounts)**
>
> API Reference for /docs/api/rest/reference/account/ma

---

<div class="post-metadata">

**Author:** ![m.lai](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@m.lai](https://devforum.zoom.us/u/m.lai)\
**Post date:** [July 29, 2024, 3:22pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/7 "2024-07-29T15:22:02Z")

</div>

Thanks @elisa.zoom , that worked.

I have a question regarding the retrieval of meeting data. When utilizing the main tenant, I can use the userID to successfully output the meeting data.

[https://api.zoom.us/v2/users/$userId/meetings?type=upcoming&page\_size=1](https://api.zoom.us/v2/users/$userId/meetings?type=upcoming&page_size=1)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/e/be8f1a5bd1a6f59dd0e8c896f208a95764bb4e4d.png)

However, when using the specified endpoint, the outcome is different. For subsite users, I execute a separate script which returns all the users, but the meeting data is absent.

Despite reviewing the API documentation, the issue remains unclear. Could this be a limitation?

Many thanks

Marcin

---

<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:** [July 30, 2024, 7:48pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/8 "2024-07-30T19:48:44Z")

</div>

Hi @m.lai

> However, when using the specified endpoint, the outcome is different. For subsite users, I execute a separate script which returns all the users, but the meeting data is absent.

Which endpoint are you talking about?

---

<div class="post-metadata">

**Author:** ![m.lai](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@m.lai](https://devforum.zoom.us/u/m.lai)\
**Post date:** [August 29, 2024, 9:10am UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/9 "2024-08-29T09:10:57Z")

</div>

Thanks @elisa.zoom, as a workaround I created an application per subsite which provided the data I needed.

---

<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:** [August 29, 2024, 12:01pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/10 "2024-08-29T12:01:19Z")

</div>

Thanks for sharing your findings with the community!

---

<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:** [August 30, 2024, 12:02pm UTC](https://devforum.zoom.us/t/calling-rest-api-subsites-from-main/114278/11 "2024-08-30T12:02:11Z")

</div>

Closed on August 30, 2024, 12:02pm UTC

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