Batch Registrants api sends an empty array as a response
POST Request
/meetings/{meetingId}/batch_registrants
Description
We have a business plus plan with Zoom. I’m sending a POST Request to Zoom via the endpoint mentioned above. The request is being sent and a response is also being received with Status Code 201. However, the expected response should be an array named registrants with values like join_url, registrant_id, etc. Instead, I just receive an empty array registrants []
. Why is this happening? I need the registrant_id to update the zoomId value for my User database. Below is the code:
const registration = await request.fetch(`https://api.zoom.us/v2/meetings/${meetingId}/batch_registrants`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + zoomAuth.body.access_token
},
body: JSON.stringify({
auto_approve: true,
registrants_confirmation_email: true,
registrants: [
{email: alex.wilson@maildrop.cc, first_name: 'Alex', last_name: 'Wilson'},
{email: charles.jones@maildrop.cc, first_name: 'Charles', last_name: 'Jones'},
{email: amy.watson@maildrop.cc, first_name: 'Amy', last_name: 'Watson'}
]
})
})
console.log('ZOOM REGISTRATION RESPONSE', registration)
Expectation?
Response is
[
"registrants": [
{ "join_url": link1, "registrant_id": 23443 },
{ "join_url": link2, "registrant_id": 23444 },
{ "join_url": link3, "registrant_id": 23445 }
]
]
Problem?
Response is
[
"registrants": []
]