Scope for "Get Plan Usage"

Description
According to the documentation, the “Get Plan Usage” endpoint “/accounts/me/plans/usage” apparently requires the “billing:master” scope. However it seems that the scope actually required is account:read:admin or account:write:admin. Is the documentation inaccurate?

Error
Invalid access token, does not contain scopes: [account:read:admin, account:write:admin].

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

Which Endpoint/s?
/accounts/me/plans/usage

How To Reproduce (If applicable)
Steps to reproduce the behavior:
Request using token with only the account:read:admin scope, and see that the request succeeds.
Request using token without the scope and see above error.

Hey @danield5s,

Thank you for reaching out to the Zoom Developer Forum. I’m thinking this might have to do with the account being requested. Looking at the billing:master permission, it may only pertain to sub-accounts.

image

Would you be able to try this same request but instead of using /me make the request for a sub-account?

I hope that helps!

Thanks,
Max

Hi Max,

Yes it looks like you are right, requesting plan usage with an account id provided instead of “me” results in a response indicating required scopes are “[billing:write:master, billing:read:master, billing:master]”.

I think then that this API will work for our use case since only the current account will be queried, however this is not clear from the documentation. It would be helpful if the documentation mentioned the different scope requirement for when the “me” parameter is used.

Thanks,
Daniel

1 Like

Hey @danield5s,

Happy to hear @MaxM helped with your question! :slight_smile:

Thanks for the feedback about the docs, we will update them shortly. CC @shrijana.g

-Tommy

2 Likes

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