Hi,
I am trying to generate access token by passing authorization code to the below api
https://zoom.us/oauth/token
but always getting below error
{
“reason”: “Invalid authorization code xxxxxxxx”,
“error”: “invalid_grant”
}
Below is my node.js code to generate access token I am using node-fetch:
const url = https://zoom.us/oauth/token?grant_type=authorization_code&code=${code}&&redirect_uri=${process.env.ZOOM_REDIRECT_URI}
;
const request = await fetch(url, {
method:'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization' : 'Basic ' + Buffer.from( username+ ':' + password).toString('base64'),
}
});
Here username and password are clientId and secret key, I have tried both with development credentials and production.
Details:
App Type: Zoom App