Description/Error
Caused by: com.zoom.v2client.ApiException: {“code”:124,“message”:“Invalid access token.”}
at com.zoom.v2client.ApiClient.invokeAPI(ApiClient.java:643)
at com.zoom.v2client.api.MeetingsApi.meetings(MeetingsApi.java:940)
Which Endpoint/s?
https://api.zoom.us/v2/users/{userId}/meetings
How To Reproduce (If applicable)
Steps to reproduce the behavior:
Generate the Java API from the Swagger 2.0 file
Call the MeetingsApi.meetings(userId, type, 30, 1) method
Screenshots (If applicable)
Additional context
I am using JWT token authentication. Using the same token works fine from the Zoom test site at https://marketplace.zoom.us/docs/api-reference/testing-zoom-apis but fails with the error above when used with the generated API code.
At first I wondered if my account had the correct permissions, but if the call works from the Zoom test site then that shouldn’t be the issue I would think.
Note, this endpoint also works fine with the same JWT token when called using the Unirest Java library.
Why is this error happening?
Thanks.
tommy
(Tommy Gaessler)
October 28, 2019, 9:24pm
3
Hey @lweber.bt_dev ,
We believe this is related to:
I have noticed two problems with the generated Java client code. At the moment, these require manual changes by me in order to use the client API code.
The user ‘pmi’ field is typed as a Java Integer in the InlineResponse20033 model class, but the field is required to have 10-digits. This means that any pmi which represents a number greater than 2147483647 (0x7FFFFFFF) will overflow the Java Integer type, and de-serialization (for example, Jackson libraries) will throw an exception.
The ac…
In the meantime, while we are working to fix, I would suggest coding the request and JWT Authentication Bearer manually without the generated code.
JIRA: DEVELOPERS-404
Thanks,
Tommy
Thanks for the reply, Tommy. I must now admit that I just discovered this one was my fault; as long as I set the JWT token then the call itself succeeds.
1 Like
tommy
(Tommy Gaessler)
October 31, 2019, 10:12pm
5
Happy to help!
Glad to hear you got it working!
Thanks,
Tommy
tommy
(Tommy Gaessler)
January 22, 2025, 10:14pm
6
Hey everyone,
Recently we launched Zoom Rivet for Node.js . Zoom Rivet is Zoom’s Official API Library and API Wrapper .
We currently support Node.js. Java, Python, GO, C#, and other languages are coming soon or being considered.
Zoom Rivet is available on npm and can be used to automatically handle OAuth and easily call Zoom APIs like Meetings , Phone , Users , Team Chat , Chatbot , Accounts , Video SDK , and more. It even includes a Webhook server to easily receive Zoom Webhooks .
npm install @zoom/rivet
Example that handles OAuth and calls a Meeting API and listens to a webhook event:
import { MeetingsS2SAuthClient } from "@zoom/rivet/meetings";
(async () => {
const meetingsClient = new MeetingsS2SAuthClient({
clientId: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
webhooksSecretToken: process.env.WEBHOOKS_SECRET_TOKEN,
accountId: process.env.ACCOUNT_ID
});
// Rivet Events and Endpoints Go Here
meetingsClient.endpoints.meetings.getMeeting({
path: { meetingId: "MEETINGID" }
}).then((response) => {
console.log(response)
});
meetingsClient.webEventConsumer.event("meeting.started", (response) => {
console.log(response.payload);
})
const server = await meetingsClient.start();
console.log(`Zoom Rivet Events Server running on: ${JSON.stringify(server.address())}`);
})();
NPM:
Zoom Rivet is a comprehensive toolkit built to help developers quickly integrate and manage server-side applications within the Zoom ecosystem. This tool currently supports Node.js, offering core functionalities like authentication, API wrappers, and...
Docs:
Sample App:
Standup Bot sample app for Zoom Rivet for JavaScript
For feedback, requests, or questions please refer to the Rivet Devforum Category:
Zoom Rivet helps quickly integrate server-side applications with Zoom. Built-in authentication, API wrappers and event subscriptions let you focus on business logic, not infrastructure.
Best,
Tommy