Issue using sub-accounts 401 'Invalid Token'

Hello guys,

I’m developing a web application using the Zoom v2 API.

Everything is working fine in ‘normal’ mode.

This application needs to create sub-accounts or users under a master account…
Zoom staff indicated my account is set as a master account.

But when I try the endpoints with /accounts/<account_id>/rest_of_url I get the following response:

status_code: 401
reason: Unauthorized
text: ‘{“code”:124,“message”:“Invalid access token.”}’

I’m also not sure what value goes in the account_id URL field (/accounts/<account_id>/rest_of_url)
The documentation is not very clear on this… BTW, actual code sample snippets would be a nice addition to the API documentation.

Not sure which is this master account_id,
Is it the Account no: 500xxxxx
or 583-XXX-XXXX
or U7yDatUeY5skkJ7nLiV5z-g’ <- not actual key of course :wink:

I have tried using each of these values with no luck:
https://api.zoom.us/v2/accounts/500xxxxx/users
https://api.zoom.us/v2/accounts/583XXXXXXX/users
https://api.zoom.us/v2/accounts/U7yDatUeY5skkJ7nLiV5z-g/users

It looks to me like either:
1- My account is not set as master account.
2- I’m using the wrong {account_id} in the endpoint URL or
3- the API is having issues with the authentication JWT token, not sure.
4- or a combination of the above

Please let me know if you need any additional information about this issue.

Thanks in advance,
Carlos Perez, S.E.

Hi @andresforde,

To check to see if you have a master account you can check Zoom.us portal page and see if you have this tab for sub accounts. If you don’t see if then you will need to make a request with our sales/support team to have a master account.

The correct account ID would be something like wtwAq4fGQRmGBGLEMG1FTQ.
Have you tried using the JWT token for another API such as GET https://api.zoom.us/v2/accounts to see if the toke works?

Thanks