# Error 500 for Plan Usage API

**URL:** <https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [October 11, 2023, 3:39am UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560 "2023-10-11T03:39:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![val.curada](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/val.curada/32/52842_2.png) [@val.curada](https://devforum.zoom.us/u/val.curada)\
**Post date:** [October 11, 2023, 3:39am UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/1 "2023-10-11T03:39:28Z")

</div>

### Format Your New Topic as Follows:

**Get Plan Usage API returns code 500 and Site does not exist**  
[Get Plan Usage](https://developers.zoom.us/docs/api/rest/reference/zoom-api/ma/#operation/GetPlanUsage)

**Description**  
Using Server-to-server OAuth, the API response is:

```auto
{
    "code": 500,
    "message": "com.saasbee.webapp.pbx.exception.PbxException: Site does not exist."
}

```

**How To Reproduce**  
_Steps to reproduce the behavior:_  
\*1. Send a GET request to [https://api.zoom.us/v2/accounts/me/plans/usage](https://api.zoom.us/v2/accounts/me/plans/usage)  
\*2. Server to Server OAuth with /account:read:admin scope  
\*3. The API responds with the error described

---

<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:** [October 11, 2023, 4:20pm UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/2 "2023-10-11T16:20:18Z")

</div>

Hi @val.curada ,

This API endpoint is for [Master Account users](https://developers.zoom.us/docs/api/rest/master-account-apis/). Can you please confirm you are one?

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

---

<div class="post-metadata">

**Author:** ![rotabigue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rotabigue/32/7495_2.png) [@rotabigue](https://devforum.zoom.us/u/rotabigue)\
**Post date:** [October 15, 2023, 2:39am UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/4 "2023-10-15T02:39:58Z")

</div>

We are using a sub account

---

<div class="post-metadata">

**Author:** ![val.curada](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/val.curada/32/52842_2.png) [@val.curada](https://devforum.zoom.us/u/val.curada)\
**Post date:** [October 16, 2023, 12:19am UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/5 "2023-10-16T00:19:17Z")

</div>

Hi @gianni.zoom,  
It is a sub-account, as mentioned by @rotabigue .  
However, this has been working on our end before. We were able to read our usage in Zoom, even before Server-to-Server OAuth. Are there any changes in the API?

Thanks.

---

<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:** [October 16, 2023, 5:03pm UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/6 "2023-10-16T17:03:42Z")

</div>

Hi @rotabigue @val.curada to confirm, are you the master account querying a subaccount id? If so, it should work. If you’re a subaccount trying to see your own usage, I do not believe it should work.

Please also confirm the querying user has the “manage the subaccount” role enabled.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/7/f70787ebc83c8df7a1b83fd0795a29513a6e8627.png)

---

<div class="post-metadata">

**Author:** ![rotabigue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rotabigue/32/7495_2.png) [@rotabigue](https://devforum.zoom.us/u/rotabigue)\
**Post date:** [October 17, 2023, 2:18am UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/7 "2023-10-17T02:18:17Z")

</div>

The account that experiencing the issue is our sub account which was working until we encountered the issue last Thursday. We there any recent changes in the authentication? With the screenshot below, we are using a different email address to manage the master account.

---

<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:** [October 17, 2023, 1:00pm UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/8 "2023-10-17T13:00:11Z")

</div>

Hi @rotabigue ,

Were you using a subaccount access token to query the endpoint for data about the subaccount? If yes, you’re saying you’ve been able to use it in this way up until this point?

Or were you using your master account access token to query the endpoint for data about the subaccount?

Can you please confirm this as well:

> [@gianni.zoom](#):
>
> Please also confirm the querying user has the “manage the subaccount” role enabled.

---

<div class="post-metadata">

**Author:** ![rotabigue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rotabigue/32/7495_2.png) [@rotabigue](https://devforum.zoom.us/u/rotabigue)\
**Post date:** [October 17, 2023, 3:50pm UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/9 "2023-10-17T15:50:22Z")

</div>

> [@gianni.zoom](#):
>
> Were you using a subaccount access token to query the endpoint for data about the subaccount? If yes, you’re saying you’ve been able to use it in this way up until this point?

Were you using a subaccount access token to query the endpoint for data about the subaccount? If yes, you’re saying you’ve been able to use it in this way up until this point? - Yes that is correct

---

<div class="post-metadata">

**Author:** ![rotabigue](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rotabigue/32/7495_2.png) [@rotabigue](https://devforum.zoom.us/u/rotabigue)\
**Post date:** [October 17, 2023, 3:51pm UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/10 "2023-10-17T15:51:07Z")

</div>

No, the role is for only the sub account.

---

<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:** [October 20, 2023, 3:06pm UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/11 "2023-10-20T15:06:40Z")

</div>

Hi @rotabigue ,

Try adjusting to satisfy the following role provisioning, generate a new token and query again:

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/7/f70787ebc83c8df7a1b83fd0795a29513a6e8627.png)

There may be a breaking change if it was previously working as is, but testing the role provisioning can help us isolate the root cause.

---

<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 23, 2024, 6:43am UTC](https://devforum.zoom.us/t/error-500-for-plan-usage-api/96560/12 "2024-10-23T06:43:38Z")

</div>

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