Very rudimentary development version of zoom auth #6

This commit is contained in:
nicolas 2021-06-11 02:13:02 +02:00
parent 65a029acde
commit 697cae9cc9

View file

@ -19,13 +19,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const authHeader = 'Basic ' + Buffer.from(client_id + ':' + client_secret).toString('base64');
return new Promise( async (resolve, reject) => {
const result = await fetch('https://zoom.us/oauth/token', {
const result = await fetch('https://zoom.us/oauth/token?grant_type=authorization_code&code=' + code + '&redirect_uri=' + redirectUri, {
method: 'POST',
body: JSON.stringify({
grant_type: 'authorization_code',
code,
redirect_uri: authUrl
}),
headers: {
Authorization: authHeader
}