# Error When create webinar registrants code: -1

**URL:** <https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578>\
**Category:** API and Webhooks\
**Created:** [July 20, 2020, 12:59am UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578 "2020-07-20T00:59:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_SITNB](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ian_sitnb/32/12148_2.png) [@Ian\_SITNB](https://devforum.zoom.us/u/Ian_SITNB)\
**Post date:** [July 20, 2020, 12:59am UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/1 "2020-07-20T00:59:22Z")

</div>

**Description**  
I was trying to create webinar registrants via API.

**Error**  
400 Bad Request  
Body:  
{  
“code”: -1,  
“message”: null  
}

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**  
POST: [https://api.zoom.us/v2/webinars/xxxxxxxxx/registrants](https://api.zoom.us/v2/webinars/xxxxxxxxx/registrants)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Request URL / Headers (without credentials) / Body
2. See error

**Screenshots (If applicable)**

 ![Image 2020-07-20 at 10.57.29 am](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/6/6d9e77c52a6d85eef55b768b3cb22af7af21ccbc.png)

**Additional context**  
I tried with another webinar id. Same result.  
Tried with Zapier zoom intergration. Same result.

---

<div class="post-metadata">

**Author:** ![hsintegration](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@hsintegration](https://devforum.zoom.us/u/hsintegration)\
**Post date:** [July 20, 2020, 2:32pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/2 "2020-07-20T14:32:56Z")

</div>

OAuth app, same issue, `{“code”: -1,“message”: null}` on attempt to create registrant. The error occurs only for some accounts, cannot reproduce on my test account.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 22, 2020, 10:43pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/3 "2020-07-22T22:43:28Z")

</div>

Hey @hsintegration, @Ian_SITNB

Can you share the request body payload JSON and the meetingUUID so I can look to see if meeting registration was enabled?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![Ian\_SITNB](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ian_sitnb/32/12148_2.png) [@Ian\_SITNB](https://devforum.zoom.us/u/Ian_SITNB)\
**Post date:** [July 22, 2020, 11:44pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/4 "2020-07-22T23:44:11Z")

</div>

Hi @tommy,  
POST: [https://api.zoom.us/v2/webinars/97401033545/registrants](https://api.zoom.us/v2/webinars/97401033545/registrants)  
Body:  
{  
“[email":"test1@gmail.com](mailto:email%22:%22test1@gmail.com)”,  
“first\_name”: “TEST”,  
“last\_name”: “TEST”,  
“phone”: “1111111”  
}  
Result: 400 Bad Request  
{  
“code”: -1,  
“message”: null  
}

---

<div class="post-metadata">

**Author:** ![ecc](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@ecc](https://devforum.zoom.us/u/ecc)\
**Post date:** [July 22, 2020, 11:55pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/5 "2020-07-22T23:55:14Z")

</div>

Same issue here with the same return. It worked 2 days ago. Same endpoint is working with Zoom Meetings but not with Webinar. Meeting registration is definitely enabled.

---

<div class="post-metadata">

**Author:** ![conventionline](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/conventionline/32/12237_2.png) [@conventionline](https://devforum.zoom.us/u/conventionline)\
**Post date:** [July 23, 2020, 3:17pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/6 "2020-07-23T15:17:23Z")

</div>

I’m having the same issue. Everything was working fine 3 days ago.

This is what I get when I try to add a registrant to a webinar:

` {"code":-1,"message":null}`

Also status code 400.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 23, 2020, 4:26pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/7 "2020-07-23T16:26:41Z")

</div>

Hey @Ian_SITNB, @ecc, @conventionline,

I am not able to reproduce the issue:

POST `https://api.zoom.us/v2/webinars/95197907800/registrants`

```json
{
  "email":"test1@gmail.com",
  "first_name": "TEST",
  "last_name": "TEST",
  "phone": "1111111"
}

```

Status `201`

Response:

```json
{
    "registrant_id": "gBQKCFcNSKOxVK6V9F9n1w",
    "id": *********** ,
    "topic": "My Webinar",
    "start_time": "2020-07-23T17:00:00Z",
    "join_url": "https://tommygaessler.zoom.us/w/95197907800?tk=1HxYzeNtQrNUJqeHjvAza38AVlaCb4D888XXXXXXXX"
}

```

 ![Screen Shot 2020-07-23 at 10.25.44 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/ad7fc47a523964f3fbeaabd6e009f684ea45689b.png)

Can you please provide your request body JSON that is throwing the error, your Zoom account number, and your OAuth / JWT App Name?

Thanks,  
Tommy

\*This post has been edited to remove any meeting / webinar IDs

---

<div class="post-metadata">

**Author:** ![ecc](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@ecc](https://devforum.zoom.us/u/ecc)\
**Post date:** [July 23, 2020, 4:28pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/8 "2020-07-23T16:28:54Z")

</div>

I tested in Postman with the exact request & spacing.

Request:

{

“email”: “[test1@gmail.com](mailto:test1@gmail.com)”,

“first\_name”: “TEST”,

“last\_name”: “TEST”,

“phone”: “1111111” }

Response status:

400 Bad Request

 ![Postman response to test](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/c/c0ba01719cc6abcedafe10a96c60738e19d9d949.jpeg)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 23, 2020, 4:29pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/9 "2020-07-23T16:29:51Z")

</div>

Hey @ecc,

Can you please provide your Zoom account number, and your OAuth / JWT App Name?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ecc](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@ecc](https://devforum.zoom.us/u/ecc)\
**Post date:** [July 23, 2020, 4:32pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/10 "2020-07-23T16:32:03Z")

</div>

Support is providing you with the account details in ticket# 6874839

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 23, 2020, 4:40pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/11 "2020-07-23T16:40:27Z")

</div>

Hey @ecc, @conventionline, @Ian_SITNB,

It looks like this issue is happening when the Webinar is set to a [paid webinar via our PayPal integration](https://support.zoom.us/hc/en-us/articles/360018597111-Configuring-Zoom-Webinars-with-PayPal).

Can you all confirm?

In the meantime our engineering team is looking into the issue. (ZOOM-179755)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ecc](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@ecc](https://devforum.zoom.us/u/ecc)\
**Post date:** [July 23, 2020, 5:12pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/12 "2020-07-23T17:12:24Z")

</div>

Issue is still happening when Paypal is turned off. Also we were able to call out to Zoom Webinar with Paypal enabled ~3 days ago. Thanks for all your help!

---

<div class="post-metadata">

**Author:** ![conventionline](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/conventionline/32/12237_2.png) [@conventionline](https://devforum.zoom.us/u/conventionline)\
**Post date:** [July 23, 2020, 5:32pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/13 "2020-07-23T17:32:45Z")

</div>

No, my webinar is free, but registration required, manual approval. We’re using a different payment system.

My account number: 110825407  
App Name: RegistroAutomatico

I tested it again via Test Request on Zoom API Reference, but it returned the same thing again

---

<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:** [July 23, 2020, 11:19pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/14 "2020-07-23T23:19:45Z")

</div>

@ecc @conventionline Can you provide your full request payload in cURL format (without token)?

---

<div class="post-metadata">

**Author:** ![ecc](https://avatars.discourse-cdn.com/v4/letter/e/779978/32.png) [@ecc](https://devforum.zoom.us/u/ecc)\
**Post date:** [July 23, 2020, 11:40pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/15 "2020-07-23T23:40:04Z")

</div>

Michael,

Please reference Zoom support case [#6874839] for all those details or Tommy Gaessler on your team as he was working on the case today. Thanks for you assistance!

---

<div class="post-metadata">

**Author:** ![Ian\_SITNB](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ian_sitnb/32/12148_2.png) [@Ian\_SITNB](https://devforum.zoom.us/u/Ian_SITNB)\
**Post date:** [July 24, 2020, 1:34am UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/16 "2020-07-24T01:34:43Z")

</div>

I raised a ticket on Monday #6821441. I didn’t get a single response until webinar is finished yesterday. Quite disappointed.

It seems this issue happens to certain webinar/meeting created in a certain time frame. The webinar which had API issue was created on last Thursday.

I created another webinar on Monday and it’s working fine.

---

<div class="post-metadata">

**Author:** ![Ian\_SITNB](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ian_sitnb/32/12148_2.png) [@Ian\_SITNB](https://devforum.zoom.us/u/Ian_SITNB)\
**Post date:** [July 24, 2020, 6:48am UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/17 "2020-07-24T06:48:31Z")

</div>

@michael_p.zoom @tommy  
It’s “Restrict number of registrants.” If it’s turned on API return -1. Turned it off then everything works fine.

---

<div class="post-metadata">

**Author:** ![conventionline](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/conventionline/32/12237_2.png) [@conventionline](https://devforum.zoom.us/u/conventionline)\
**Post date:** [July 24, 2020, 12:49pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/18 "2020-07-24T12:49:42Z")

</div>

@Ian_SITNB I turned it off, and it worked!

@michael_p.zoom

Here’s the code:

> ```
> function putRegistrantZoom($idWebinar, $email, $nomeCompleto, $pedido, $whats) {
> global $KEY_ZOOM;
> $curl = curl_init();
> curl_setopt_array($curl, array(
> CURLOPT_URL => "https://api.zoom.us/v2/webinars/{$idWebinar}/registrants",
> CURLOPT_RETURNTRANSFER => true,
> CURLOPT_ENCODING => "",
> CURLOPT_MAXREDIRS => 10,
> CURLOPT_TIMEOUT => 30,
> CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
> CURLOPT_CUSTOMREQUEST => "POST",
> CURLOPT_POSTFIELDS => "{\"email\":\"{$email}\",
> \"first_name\":\"{$nomeCompleto}\",
> \"last_name\":\"{$pedido}\"}",
> CURLOPT_HTTPHEADER => array(
> "authorization: Bearer ".$KEY_ZOOM,
> "content-type: application/json"
> ),
> ));
> $response = curl_exec($curl);
> $err = curl_error($curl);
> curl_close($curl);
> return json_decode($response, true);
> }
> function autorizaZoom($webinarId, $registrantId, $registrantEmail, $acao) {
> global $KEY_ZOOM;
> $curl = curl_init();
> curl_setopt_array($curl, array(
> CURLOPT_URL => "https://api.zoom.us/v2/webinars/{$webinarId}/registrants/status",
> CURLOPT_RETURNTRANSFER => true,
> CURLOPT_ENCODING => "",
> CURLOPT_MAXREDIRS => 10,
> CURLOPT_TIMEOUT => 30,
> CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
> CURLOPT_CUSTOMREQUEST => "PUT",
> CURLOPT_POSTFIELDS => "{\"action\":\"{$acao}\",\"registrants\":[{\"id\":\"{$registrantId}\",\"email\":\"{$registrantEmail}\"}]}",
> CURLOPT_HTTPHEADER => array(
> "authorization: Bearer ".$KEY_ZOOM,
> "content-type: application/json"
> ),
> ));
> $response = curl_exec($curl);
> $err = curl_error($curl);
> curl_close($curl);
> return json_decode($response, true);
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![joedone](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@joedone](https://devforum.zoom.us/u/joedone)\
**Post date:** [July 24, 2020, 7:59pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/19 "2020-07-24T19:59:06Z")

</div>

Thank you! Been struggling with this all morning.

I turned off the restrict registrant count and all is swell on the existing webinars. This came out of nowhere and glad I saw this post.

I created a new webinar and no issue…but if I turn on the “Restrict number of registrants" for the new webinar, the API will return the -1 code for adding registrants.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 28, 2020, 10:15pm UTC](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578/20 "2020-07-28T22:15:38Z")

</div>

Hey @joedone, @conventionline, @Ian_SITNB, @ecc,

The issue was due to the “Restrict number of registrants” setting. We fixed the bug on Sunday and it will work now.

Thanks for all your patience,  
Tommy

[Next page](https://devforum.zoom.us/t/error-when-create-webinar-registrants-code-1/24578.md?page=2)
