Description
We have an oauth app that appears to be working most of the time. It will use a stored refresh token to get a new access token, then create a meeting using the access token for authorization. And of course it save the new refresh and access token for next time.
It seems to work most of the time but we’re occasionally getting a 401.
Error
HTTP 401 unauthorized status code returned.
Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth
How To Reproduce (If applicable)
Post to URL https://zoom.us/oauth/token
Content-Type-- ‘application/x-www-form-urlencoded below is pseudo code for auth and body
Authorization-- "Basic " + base64 encoded (API Key + “:” + API Secret )
body – grant_type=refresh_token’
+ ‘&refresh_token=’ + URLEncodedUTF-8(refreshtoken)
Screenshots (If applicable)
N/A
Additional context
Is there something that could make a stored refresh token no longer valid? It seems like it works most of the time but some users have reported occasional failure. If they manually reauthorize, it starts working for a while but could fail a few days later. But also, some users that haven’t authorized in weeks are code can refresh and get new tokens with no issues.
I may have found the issue. We’re getting an occasional {“code”:300,“message”:“Invalid meetingId”} on cancel meeting. Our code composes and exception for our application to handle at a higher level but then the token that was just refreshed doesn’t get saved. Bottom line is we have to put the save token in a “finally” so it always gets saved.
Note sure why we’re getting an occasional 300 on cancel, maybe the meeting was manually deleted outside our application.