I tried to finish auth workflow with a auth app and got the following error. The strange part is it works for the most of time… Please see How To Reproduce session for more details.
Error
Zoom API error: invalid_request, reason: Invalid authorization code mk1Cq8Pap6_PatCmZLwQxKCZOUJsBwojQ"
Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth
In this http endpoint, i tried to use the returned code to get an auth token but got the above error.
This only happened only after I already used the same IAM_user_id to get a token before (and it worked). The auth workflow would work again if I change IAM_user_id to something else, say: fake_id
I url encoded my state token but I still got the error Error processing zoom oauth2 redirect request: the code [ibcgiRImMi_PatCmZLwQxKCZOUJsBwojQ] for exchanging OAuth token is invalid. Can you check your logs to see what happened???
It worked again (with or without url encoding state token) ONLY AFTER I fully deleted my existing token in the database… However, the database in my system only supports soft delete (by adding deleted date to a row) and this error occurred when I soft deleted my token and re-authed.
Make sure once you get an access_token the first time, you use the refresh flow to get a new access_token, and not the original get get access token request passing in the code ibcgiRImMi_PatCmZLwQxKCZOUJsBwojQ.
Sometimes we wanna to delete an existing token to retest auth workflow. Do you think it would help if I revoke my existing token first before doing re-auth?