Scoured through the devforum but couldn’t solve my issue.
Meeting SDK Type and Version
Web Meeting SDK, JWT App, Account-level app.
Description
I’m developing a simple app to create a meeting using the zoom api
const url = “https://api.zoom.us/v2/users/{userid}/meetings”. I have passed in the body and header as follows:
const data = {
“agenda”: “My Meeting”,
“default_password”: false,
“duration”: 60,
“password”: “123456”,
“pre_schedule”: false
}
const params = {
uri: url,
method: 'POST',
mode: 'cors',
header: {
'Content-Type': 'application/json',
'authorization': 'Bearer xxx'
},
body: JSON.stringify(data)
}
fetch(url, params)
.then(res => res.json())
.then(result => console.log(result))
.catch(err => console.log(err))
})
This api works in Postman well with the above body and header, but returns 124, invalid access token in my browser. I have disabled cors check on my browser since this is only a internal app. I have also tried using the me/meetings path, but doesn’t work.
Error?
{code: 124, message: ‘Invalid access token.’}
code: 124
message: “Invalid access token.”
[[Prototype]]: Object
constructor: ƒ Object()
hasOwnProperty: ƒ hasOwnProperty()
isPrototypeOf: ƒ isPrototypeOf()
propertyIsEnumerable: ƒ propertyIsEnumerable()
toLocaleString: ƒ toLocaleString()
toString: ƒ toString()
valueOf: ƒ valueOf()
__defineGetter__: ƒ __defineGetter__()
__defineSetter__: ƒ __defineSetter__()
__lookupGetter__: ƒ __lookupGetter__()
__lookupSetter__: ƒ __lookupSetter__()
__proto__: (...)
get __proto__: ƒ __proto__()
set __proto__: ƒ __proto__()
Troubleshooting Routes
Tried everything from sample app to all suggestions by others on the forum, but nothing works.
How To Reproduce
Steps to reproduce the behavior including:
Authentication method: JWT token, App type: JWT app
Thanks.