Very rudimentary development version of zoom auth #6
This commit is contained in:
parent
65a029acde
commit
697cae9cc9
1 changed files with 1 additions and 6 deletions
|
@ -19,13 +19,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
const authHeader = 'Basic ' + Buffer.from(client_id + ':' + client_secret).toString('base64');
|
const authHeader = 'Basic ' + Buffer.from(client_id + ':' + client_secret).toString('base64');
|
||||||
|
|
||||||
return new Promise( async (resolve, reject) => {
|
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',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
|
||||||
grant_type: 'authorization_code',
|
|
||||||
code,
|
|
||||||
redirect_uri: authUrl
|
|
||||||
}),
|
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: authHeader
|
Authorization: authHeader
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue