"meeting_capacity" with large meeting add-on

The REST API provides info about user features in this section: https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usersettings
It responds with the following fields in its “feature” section:
“meeting_capacity”
“large_meeting_capacity”
As I understand “large_meeting_capacity” specify add-on info about capacity. The question is what will be the value of “meeting_capacity”, in account has large meetings add-on enabled?

Hi Oleg_Anikin,

If “large_meeting” is set to true, then the “meeting_capacity” parameter will be ignored. Therefore, you can either set “meeting_capacity” to the same value you used for “large_meeting_capacity” or remove the parameter entirely.

Thanks
Stefan

Hi @stefan.francisco,

Thanks for reply, but my question relates to information we get from zoom REST API about “meeting_capacity”, when user have “large meeting” add-on.
In which field information with actual meeting capacity will be?

Hi @Oleg_Anikin,

When using the Retrieve User Settings API call, it will return both “meeting_capacity” and “large_meeting_capacity” values. Both of these values will be equal if “large_meeting” is true.

"feature": {
    "meeting_capacity": 200,
    "large_meeting": true,
    "large_meeting_capacity": 200,
    "webinar": true,
    "webinar_capacity": 500,
    "cn_meeting": false,
    "in_meeting": false
}

EDIT: To answer your question, you can use either value. In my opinion, I suggest to use “meeting_capacity” each time so you do not have to check the condition if “large_meeting” is true.

1 Like

Thank you for the answer, @stefan.francisco

Hi @stefan.francisco

Im trying to update the status of a user from my master account usin the method update,
but I what I really want to do is change the status from Basic to Licensed with large meeting 500 and webinar 500 at the same time . This is my code, it doesn’t show any erro but just change the status, no the meeting capacity:

user_data = {“id”:“T1aiiquLQrewG4yvlHX8Fg”,“type”: USER_LICENSED,“feature”: {“meeting_capacity”: 500,“large_meeting”: True,“large_meeting_capacity”: 500,“webinar”: True,“webinar_capacity”: 500,“cn_meeting”: False,“in_meeting”: False}}
response = client.user.update(**user_data).
Could you help me please? I’m using Python

Hi @workinglive,

What is the exact endpoint you are using? If you are on the same account as this user, you will need to use this endpoint:
PATCH /users/{userId}/settings

“type” is not a parameter with this endpoint

I have attached boilerplate Python code using this endpoint and updating the user successfully. Please review it and let me know if you have any questions.

Python Code
import requests
import json

jwtToken = ''
userId = ''

headers = {
    'Authorization': 'Bearer ' + jwtToken,
    'Content-Type': 'application/json',
}

data = '\
{\
    "feature": {\
        "meeting_capacity": 500,\
        "large_meeting": false,\
        "webinar": true,\
        "cn_meeting": false,\
        "in_meeting": false,\
        "zoom_phone": false\
        }\
}\
'

response = requests.patch('https://api.zoom.us/v2/users/' + userId + '/settings', headers=headers, data=data)
print(response.status_code) ## 204 is expected output for success

Thanks
Stefan

Hi @stefan.francisco,

Im using python library “zoomus” and conecting using
client=zoomus.ZoomClient(“API_KEY”,“API_Secret”)
I have a master account so I can add users under my account and update the status as well.
To update the status I’m using update method
user_data = {“id”:“User_Id”,“type”: 2} #first of all I create a dictionary with the information
response = client.user.update(**user_data)
And that works good, but I need to know if I can use the same library to add the new features like meeting capacity

@workinglive Hi there,

I believe you may be referring to this library: https://github.com/prschmid/zoomus

Before we proceed I would like to inform you that this package is not created by Zoom.

It looks like the library’s update function is using the endpoint PATCH /users/{userId} , so you would not be able to use this function to update features. The contributors would need to add another function that would call the endpoint PATCH /users/{userId}/settings

Here is the update function for this library:

def update(self, **kwargs):
    util.require_keys(kwargs, "id")
    return self.patch_request("/users/{}".format(kwargs.get("id")), data=kwargs)

You may be able to add this function yourself by making a minor change to the function’s endpoint and pass your dictonary through.

First, find and locate the zoomus library’s “user.py” file on your environment.
Second, add these two functions in zoomus.user.py under the UserComponentV2 class (get, set for User settings):

def updateSettings(self, **kwargs):
    util.require_keys(kwargs, "id")
    return self.patch_request("/users/{}/settings".format(kwargs.get("id")), data=kwargs)

def getSettings(self, **kwargs):
    util.require_keys(kwargs, "id")
    return self.get_request("/users/{}/settings".format(kwargs.get("id")), params=kwargs)

Use these functions in main.py:

import json
import zoomus

client = zoomus.ZoomClient('', '')
user_data = {'id': userID, 'type': 2, 'feature': { 'meeting_capacity': 1000, 'large_meeting': True, 'webinar': False, 'cn_meeting': True, 'in_meeting': False, 'zoom_phone': False }}

## Update the Settings
updateSettings = client.user.updateSettings(**user_data)

## Get Settings to validate changes
response = client.user.getSettings(**user_data)
responseJSON = json.loads(response.content)
print(responseJSON)
1 Like

@stefan.francisco Thank you so much for the clarification, I already add the new functions, but O tried with different users and always get response 404, user doesnt exist, and but when I use different functions the code works good.
Do you know why always get response 404 ?

@workinglive This usually occurs if the endpoint URL is invalid. Does this occur for both calls provided in my prior response?

1 Like

Hi @stefan.francisco

The function update is not working but getSettings works good

@stefan.francisco
Hi again,
Could you help me to fix this?

Hi @workinglive

As mentioned before, 404 is usually an invalid endpoint. To further assist, I would need to review how you have set up these calls. Can you please paste any code related to the update function? Please make sure to omit any sensitive information such as API Keys and Secrets or JWT/OAuth tokens.

Thanks
Stefan

1 Like

Hi @stefan.francisco ,

Thank you for your response, I set up these functions in user.py.

class UserComponentV2(base.BaseComponent):
    def list(self, **kwargs):
        return self.get_request("/users", params=kwargs)

    def create(self, **kwargs):
        return self.post_request("/users", data=kwargs)

    def update(self, **kwargs):
        util.require_keys(kwargs, "id")
        return self.patch_request("/users/{}".format(kwargs.get("id")), data=kwargs)

    def delete(self, **kwargs):
        util.require_keys(kwargs, "id")
        return self.delete_request("/users/{}".format(kwargs.get("id")), params=kwargs)

    def updateSettings(self, **kwargs):
        util.require_keys(kwargs, "id")
        return self.patch_request("/users/{}/settings".format(kwargs.get("id")), data=kwargs)

    def getSettings(self, **kwargs):
        util.require_keys(kwargs, "id")
        return self.get_request("/users/{}/settings".format(kwargs.get("id")), params=kwargs)
    def get(self, **kwargs):
        util.require_keys(kwargs, "id")
        return self.get_request("/users/{}".format(kwargs.get("id")), params=kwargs)

In the main:

import json
import zoomus
client = zoomus.ZoomClient(' ', ' ')
user_data = {'id': userID, 'type': 2, 'feature': { 'meeting_capacity': 500, 'large_meeting': True, 'webinar': False, 'cn_meeting': True, 'in_meeting': False, 'zoom_phone': False }}
#Update settings
updateSettings = client.user.updateSettings(**user_data)#Response 404
#Get settingd
response = client.user.getSettings(**user_data) # Response 202 Works good!

Thank you,

Hey @workinglive,

What is the userID of the user you are trying to update?

Thanks,
Tommy

@tommy @stefan.francisco

T1aiiquLQrewG4yvlHX8Fg" this user is under my master account

Thanks

Hey @workinglive,

You will have to make 2 requests. One to Update User, to update the plan to licensed, and another request to Update User Settings to update the features.

PATCH https://api.zoom.us/v2/users/T1aiiquLQrewG4yvlHX8Fg

{
   "type":"Licensed"
}

Then, PATCH https://api.zoom.us/v2/users/T1aiiquLQrewG4yvlHX8Fg/settings

Please try the following request url and request body JSON:

{
   "feature": {
      "meeting_capacity": 200 
   }
}

Let me know if that works.

Thanks,
Tommy