# Uneable create meeting with REST API

**URL:** <https://devforum.zoom.us/t/uneable-create-meeting-with-rest-api/2611>\
**Category:** API and Webhooks\
**Created:** [November 28, 2018, 3:51pm UTC](https://devforum.zoom.us/t/uneable-create-meeting-with-rest-api/2611 "2018-11-28T15:51:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorge.juarez](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jorge.juarez](https://devforum.zoom.us/u/jorge.juarez)\
**Post date:** [November 28, 2018, 3:51pm UTC](https://devforum.zoom.us/t/uneable-create-meeting-with-rest-api/2611/1 "2018-11-28T15:51:02Z")

</div>

Hi everyone!

I can get the list users and meetings, but when I try create a new meeting or user I can´t.

My code in PHP is:

```
$ch = curl_init('https://api.zoom.us/v2/meetings');	
$d= array(
    "topic" => "AKIMA",
    "type" => "2",
    "timezone" => "America/Mexico_City",
    "start_time" => "2018-12-01T11:00:00Z",
    "duration" => "5",
    "settings" => array(
                 "auto_recording" => "local"
                )
      );
$d = json_encode($d);
echo $d . '<br \>';
curl_setopt($ch, CURLOPT_POST, 1);	
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_POSTFIELDS, $d);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . generateJWT(),
"Content-Type: application/json"));

$response = curl_exec( $ch );
$response = json_decode( $response );

```

My JSON string is:

{  
“topic”:“AKIMA”,  
“type”:“2”,  
“timezone”:“America/Mexico\_City”,  
“start\_time”:“2018-12-01T11:00:00Z”,  
“duration”:“5”,  
“settings”:  
{  
“auto\_recording”:  
“local”  
}  
}

When I run the program the query does not bring anything, no error, it comes empty

If I try using JavaScript with the next code:

var arr = { action: ‘create’, user\_info: { email: ‘pedro.x@abc.com.mx’, type: 1, first\_name: ‘Pedro’, last\_name: ‘X’, password: ‘123ABC’ } };  
$.ajax({  
url : ‘[https://api.zoom.us/v2/users?access\_token=XXX](https://api.zoom.us/v2/users?access_token=XXX)’,  
data : arr,  
method : ‘POST’,  
dataType : ‘jsonp’,  
jsonpCallback: ‘apiStatus’,  
success: function( msg ) {  
console.log(‘callback success’);  
},  
error: function( jqXhr, textStatus, errorThrown ) {  
console.log( errorThrown );  
}  
});

```
	        window.jsonpCallback = function(response) {
			    console.log('callback success');
			};

```

The program Show me the error:

jQuery1830649454693285679\_1359620502896 was not called JSON

But the request brings me the user list:  
{  
“page\_count”:1,  
“page\_number”:1,  
“page\_size”:30,  
“total\_records”:1,  
“users”:[  
{"  
id":“lIezVG0qST-XX”,  
“first\_name”:“Jorge”,  
“last\_name”:“Y”,  
“email”:“jorge.y@abc.com.mx”,  
“type”:1,  
“pmi”:27504XXX,  
“timezone”:“America/Mexico\_City”,  
“verified”:1,  
“created\_at”:“2018-11-23T18:38:41Z”,  
“last\_login\_time”:“2018-11-23T18:38:41Z”  
}]  
}

Can you help me, please.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [November 29, 2018, 8:27pm UTC](https://devforum.zoom.us/t/uneable-create-meeting-with-rest-api/2611/2 "2018-11-29T20:27:18Z")

</div>

Hi @jorge.juarez,

Your payload looks correct, have you tried making the same API call using Curl or Postman?

Thanks

---

<div class="post-metadata">

**Author:** ![Jonathan\_Champ](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jonathan_champ/32/45_2.png) [@Jonathan\_Champ](https://devforum.zoom.us/u/Jonathan_Champ)\
**Post date:** [November 29, 2018, 10:38pm UTC](https://devforum.zoom.us/t/uneable-create-meeting-with-rest-api/2611/3 "2018-11-29T22:38:43Z")

</div>

@jorge.juarez It looks like the PHP is using PATCH, which is the “[Update a meeting](https://devdocs.zoom.us/api-reference/zoom-api/meetings/meetingupdate)” method.

The “[Create a meeting](https://devdocs.zoom.us/api-reference/zoom-api/meetings/meetingcreate)” method is:  
`POST https://api.zoom.us/v2/users/{userId}/meetings`

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [November 29, 2018, 10:41pm UTC](https://devforum.zoom.us/t/uneable-create-meeting-with-rest-api/2611/4 "2018-11-29T22:41:04Z")

</div>

Great catch @Jonathan_Champ!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 6:00pm UTC](https://devforum.zoom.us/t/uneable-create-meeting-with-rest-api/2611/5 "2020-08-21T18:00:06Z")

</div>


