JWT auth error with generated API code

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:

  1. Generate the Java API from the Swagger 2.0 file
  2. 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.

Hey @lweber.bt_dev,

We believe this is related to:

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

Happy to help!

Glad to hear you got it working! :slight_smile:

Thanks,
Tommy