# Using node-fetch not able to create meeting, throwing invalid json error

**URL:** <https://devforum.zoom.us/t/using-node-fetch-not-able-to-create-meeting-throwing-invalid-json-error/63640>\
**Category:** API and Webhooks\
**Created:** [February 2, 2022, 3:23pm UTC](https://devforum.zoom.us/t/using-node-fetch-not-able-to-create-meeting-throwing-invalid-json-error/63640 "2022-02-02T15:23:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishks1234](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/krishks1234/32/34618_2.png) [@krishks1234](https://devforum.zoom.us/u/krishks1234)\
**Post date:** [February 2, 2022, 3:23pm UTC](https://devforum.zoom.us/t/using-node-fetch-not-able-to-create-meeting-throwing-invalid-json-error/63640/1 "2022-02-02T15:23:47Z")

</div>

**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](https://api.zoom.us/v2/users/%7BuserID%7D/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](https://api.zoom.us/v2/users/%7BuserID%7D/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

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [February 28, 2022, 11:47pm UTC](https://devforum.zoom.us/t/using-node-fetch-not-able-to-create-meeting-throwing-invalid-json-error/63640/2 "2022-02-28T23:47:47Z")

</div>

Hi @krishks1234

Thanks for reaching out to the Zoom developer forum, I am happy to help here!  
Have you tried testing this on Postman or insomnia to make sure this is working?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 31, 2022, 9:48am UTC](https://devforum.zoom.us/t/using-node-fetch-not-able-to-create-meeting-throwing-invalid-json-error/63640/3 "2022-03-31T09:48:45Z")

</div>

Closed on March 31, 2022, 9:48am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
