Error When create webinar registrants code: -1

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

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

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

Screenshots (If applicable)

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

1 Like

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.

1 Like

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

Hi @tommy,
POST: https://api.zoom.us/v2/webinars/97401033545/registrants
Body:
{
email":"test1@gmail.com”,
“first_name”: “TEST”,
“last_name”: “TEST”,
“phone”: “1111111”
}
Result: 400 Bad Request
{
“code”: -1,
“message”: null
}

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.

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.

Hey @Ian_SITNB, @ecc, @conventionline,

I am not able to reproduce the issue:

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

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

Status 201

Response:

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

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

I tested in Postman with the exact request & spacing.

Request:

{

“email”: “test1@gmail.com”,

“first_name”: “TEST”,

“last_name”: “TEST”,

“phone”: “1111111” }

Response status:

400 Bad Request

Hey @ecc,

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

Thanks,
Tommy

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

1 Like

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.

Can you all confirm?

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

Thanks,
Tommy

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!

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

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

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!

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.

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

1 Like

@Ian_SITNB I turned it off, and it worked!

@Michael_Purnell

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);
}

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.

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