Description
Getting invalid token response when make API call to retrieve subaccounts.
Generated JWT token using jwt.io page as mentioned in medium.com/zoom-developer-blog/using-zoom-apis-version-2-with-postman-3fba79dcdf2e
Created a test JWT app from zoom app marketplace, used the API credentials right from there.
Error
Response:
{
“code”: 124,
“message”: “Invalid access token.”
}
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT
Which Endpoint/s?
accounts
How To Reproduce (If applicable)
Steps to reproduce the behavior:
{{base_url}}/accounts?page_size=30&page_number=1
See error
Screenshots (If applicable)
Additional context
Add any other context about the problem here.
tommy
(Tommy Gaessler)
February 4, 2020, 7:35pm
2
Hey @amztimeram , thanks for posting and using Zoom!
Can you send me a screenshot of your postman request URL and response?
Also how are you setting the JWT Token in the request?
Thanks,
Tommy
Look like it works with Users/Meeting APIs but not account API. Setting up the JWT token in Authorization header with the Bearer string prefix.
Req: {{baseUrl}}/users?status=active&page_size=30&page_number=1&role_id=
Res: {
“page_count”: 0,
“page_number”: 1,
“page_size”: 30,
“total_records”: 0,
“users”:
}
tommy
(Tommy Gaessler)
February 5, 2020, 5:02pm
4
Hey @amztimeram ,
Thanks for providing the screenshot. This is intended functionality because in order to call the GET /accounts endpoint you have to be a Zoom partner.
From the docs :
“Only master accounts can create and have sub accounts. Zoom only assigns this privilege to trusted partners.”
If you can, use the GET /users API instead.
Thanks,
Tommy
ok. thank you. I thought the same.
1 Like
tommy
(Tommy Gaessler)
February 5, 2020, 11:01pm
6
Happy to help!
Let us know if you have any other questions!
Thanks,
Tommy
Hi Tommy,
I’m exploring the user APIs, I could get the individual user account details but not the list users.
Active UserIDs:
“id”: “xGqnsesMRT-YJ3eKgPHppA”, - owner
“id”: “12AraCijT-GItldVu8MIRw”, - member
“id”: “s9I1GPb6SmSVjnhByzucTA”, - member
Request:
{{baseUrl}}/users?status=active&page_size=30&page_number=1&role_id=
Response:
{
“page_count”: 0,
“page_number”: 1,
“page_size”: 30,
"total_records": 0,
** “users”: **
}
tommy
(Tommy Gaessler)
February 7, 2020, 5:51pm
8
Hey @amztimeram ,
Try without the &role_id=
query param.
{{baseUrl}}/users?status=active&page_size=30&page_number=1
Thanks,
Tommy
Thanks. I would like to know which API gives me the numeric account id instead of uuid in the responses? I have an licensed account (type 2) and trying to get the /accounts or /accounts/{account_id}/billing APIs but those comes with ‘124 invalid access token’ error. the same access token works with User APIs. please assist.
tommy
(Tommy Gaessler)
February 11, 2020, 6:48pm
10
Hey @amztimeram ,
For the billing and account APIs as stated in the docs :
“Only master accounts can create and have sub accounts. Zoom only assigns this privilege to trusted partners.”
May I ask your use case in getting the account number, to see if there is an alternative.
Thanks,
Tommy