mieszko4 / react-native-zoom-us

MIT License
126 stars 118 forks source link

Initialize with jwt doesn't work, but with clientKey and clientSecret it does #254

Closed wilkinson4 closed 1 year ago

wilkinson4 commented 1 year ago

The workflow I'm trying to implement the ZoomSDK for entails a user will start a zoom meeting from our web app, and our server will be responsible for sending the meetingId and JWT to our mobile app. The users of the mobile app will not sign in to Zoom, they will just join the meeting and leave the meeting when it's finished. It works perfectly when testing it locally when using the clientKey and clientSecret to initialize the Zoom SDK, but if I hard code a JWT from a server function I wrote and try to initialize the ZoomSDK that way like so:

ZoomUs.initialize({
   jwtToken: '...'
})

I get the following error message:

ERR [Error: Error= 1 (invalidArguments), internalErrorCode=0]

I looked at a previous issue and I saw that the error code relates to MEETING_ERROR_INCORRECT_MEETING_NUMBER, but I've created a JWT with the meeting number which is optional, and I still get the same error message. I'm running the app in MacOS Ventura 13.0.1 on an M1 Mac

wilkinson4 commented 1 year ago

Ok so this is funny. Zoom's SDK docs say that you can have a JWT with an expiration of 1800 seconds, but it seems like a Zoom developer there used a greater than sign instead of a greater than or equals because the JWT worked when it's expiration was 1801 seconds.