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.
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.
Would you be able to try this same request but instead of using /me make the request for a sub-account?
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.