API Endpoint(s) and/or Zoom API Event(s)
post /phone/users/batch
var phonePayload = {
users: [
{
email: email,
first_name: first_name,
last_name: last_name,
calling_plans: ["US/CA Unlimited"],
extension_number: extension_number,
sms: true,
},
],
};
var config = {
method: "post",
url: `https://api.zoom.us/v2/phone/users/batch`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${zoomAccessToken}`,
},
data: phonePayload,
};
Description
I am trying to automate our user on-boarding to create our users via the API in both meetings and phones.
Due to the way our licenses are setup, i cannot use the “feature” parameter when creating a new zoom meeting user so it will automatically set the phone portion up for me.
// This does not seem to work with the type of zoom license/account setup we have, have to call phone API seperatly after this user is created
if (zoom_phone) {
// Enable Phone too
payload.feature = {};
payload.feature.zoom_phone = zoom_phone;
payload.feature.zoom_one_type = 16;
}
So upon success of meeting user creation, i then call this phone users endpoint to create the phone user access. This is working great except it does not assign a number to the user, and i have to hardcode the extension.
- I do not want to maintain a list of extensions to assign
- i do not want to maintain a list of phone numbers to assign
How can i create a phone user over the API and automatically assign the next numerical extension that is available, as well as phone number.
Is there another endpoint i need to hit to claim a “free number” in the area code we desire and then hardcode it into my user account creation call?