Description
Used node-fetch to make api call for creating a meeting but it throws error that body is not JSON
Error
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><code>300</code><message>Request Body should be a valid JSON object.</message></error>
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT
Which Endpoint/s?
"https://api.zoom.us/v2/users/{userID}/meetings
How To Reproduce (If applicable)
const header = {
'Authorization': 'Bearer' + token,
'User-Agent': 'Zoom-api-Jwt-Request',
'content-type': 'application/json'
}
const bodys ={
'topic': 'Test',
‘type’: ‘2’,
'start_time': '2020-05-08T10:00:00',
'duration': '60'
}
fetch(“https://api.zoom.us/v2/users/{userID}/meetings”,{ method:“POST”, headers: header, body:bodys}
).then (response => {
return response.text();
}).then((json) => {
console.log(json);
}).catch(error => console.log(error));
I not able to find what error in JSON