Zoom Apps Configuration
React with Backend Service
ZoomSdk version 16.5 installed via npm GitHub - zoom/appssdk: Build Apps that run in the Zoom Client
Description
I am working on implementing in-client auth and am able to successfully receive a response and code from the zoomSdk.authorize and zoomSdk.addEventListener(“onAuthorized”, callback) methods. However, when using the code from the onAuthorized callback to request an access token, I’m receiving an error from the Zoom token endpoint.
Error?
When attempting to fetch a token I get the following response:
{'reason': 'Invalid authorization code jH8sFKaViM_RSTLNTS-Tk-_mCVkEdZpAQ', 'error': 'invalid_grant’}
The code above is the one received in the onAuthorize callback.
Troubleshooting Routes
I’ve already attempted generating the PKCE challenge and verifier manually to rule out issues with the code_verifier being sent to Zoom’s /oauth/token url
How To Reproduce
I’m using a development app to test in-client auth and am following the work-around described in zoom docs to test.
In the FE - authorize and handle onAuthorized callback
zoomSdk.authorize({ codeChallenge })
zoomSdk.sendEventListener("onAuthorized", getTokenViaBackend)
In the BE - Get the code and code_verifier from the FE request and make a call to the zoom token endpoint, which results in the error message above.
params = {
grant_type: "authorization_code",
redirect_uri: redirect_uri,
"code": code,
"code_verifier": code_verifier
}
requests.post(url=https://zoom.us/oauth/token?{urlencode(search_params},
auth=basic_auth(client_id:client_secret),
headers={"Content-Type": "application/x-www-form-urlencoded"}),
Any help would be appreciated. Thanks!