Utilities to interact with the Zoom API v2
Project description
Zoom API Helper
Utilities to interact with the Zoom API v2
Free software: MIT license
Documentation: https://zoom-api-helper.readthedocs.io.
Zoom API Docs: https://marketplace.zoom.us/docs/api-reference/zoom-api.
Installation
The Zoom API Helper library is available on PyPI, and can be installed with pip:
$ pip install zoom-api-helper
You’ll also need to create a Server-to-Server OAuth app as outlined in the docs.
Features
Zoom API v2: List users, create meetings, and bulk create meetings.
Support for a Server-to-Server OAuth flow.
Local caching of access token retrieved from OAuth process.
Quickstart
Start by creating a helper client (ZoomAPI) to interact with the Zoom API:
>>> from zoom_api_helper import ZoomAPI
>>> zoom = ZoomAPI('<CLIENT ID>', '<CLIENT SECRET>',
... # can also be specified via `ZOOM_ACCOUNT_ID` env variable
... account_id='<ACCOUNT ID>')
Retrieve a list of users via ZoomAPI.list_users():
>>> zoom.list_users()
{'page_count': 3, 'page_number': 1, 'page_size': 300, 'total_records': 700, 'users': [{'id': '-abc123', 'first_name': 'Jon', 'last_name': 'Doe', 'email': 'jdoe@email.org', 'timezone': 'America/New_York', ...}, ...]}
Or, a mapping of each Zoom user’s Email to User ID:
>>> zoom.user_email_to_id(use_cache=True)
{'jdoe@email.org': '-abc123', 'dsimms@email2.org': '-xyz321', ...}
Create an individual meeting via ZoomAPI.create_meeting():
>>> zoom.create_meeting(topic='My Awesome Meeting')
{'uuid': 'T9SwnVWzQB2dD1zFQ7PxFA==', 'id': 91894643201, 'host_id': '...', 'host_email': 'me@email.org', 'topic': 'My Awesome Meeting', 'type': 2, ...}
To bulk create a list of meetings in a concurrent fashion, please see the section on Bulk Create Meetings below.
Local Storage
This library uses a local storage for cache purposes, located under the user home directory at ~/.zoom/cache by default – though this can location be customized, via the CACHE_DIR environment variable.
The format of the filenames containing cached data will look something similar to this:
{{ Purpose }}_{{ Zoom Account ID }}_{{ Zoom Client ID }}.json
Currently, the helper library utilizes the file cache for two purposes:
Storing the access token retrieved from the OAuth step, so that the token only needs to be refreshed after ~1 hour.
Storing a cached mapping of Zoom User emails to User IDs, as generally the Zoom APIs only require the User ID’s.
As otherwise, retrieving this mapping from the API can sometimes be expensive, especially for Zoom accounts that have a lot of Users (1000+).
Bulk Create Meetings
In order to bulk create meetings – for example, if you need to create 100+ meetings in a short span of time – use the ZoomAPI.bulk_create_meetings() method.
This allows you to pass in an Excel (.xlsx) file containing the meetings to create, or else pass in the rows with the meeting info directly.
Example
Suppose you have an Excel file (meeting-info.xlsx) with the following data:
Group Name |
Zoom Username |
Topic |
Meeting Date |
Meeting Time |
Duration Hr |
Duration Min |
Meeting URL |
Meeting ID |
Passcode |
---|---|---|---|---|---|---|---|---|---|
A-BC:TEST:Sample Group 1 |
TEST Meeting #1: Just an example |
10/26/25 |
3:30 PM |
1 |
30 |
||||
A-BC:TEST:Sample Group 2 |
TEST Meeting #2: Here’s another one |
11/27/25 |
7:00 PM |
1 |
0 |
||||
A-BC:TEST:Sample Group 3 |
TEST Meeting #3: This is the last for now |
9/29/25 |
9:00 PM |
1 |
15 |
Then, here is a sample code that would allow you to bulk create the specified meetings in the Zoom Account.
Note: replace the credentials such as <CLIENT ID> below as needed.
from datetime import datetime
from zoom_api_helper import ZoomAPI
from zoom_api_helper.models import *
def main():
zoom = ZoomAPI('<CLIENT ID>', '<CLIENT SECRET>', '<ACCOUNT ID>')
# (optional) column header to keyword argument
col_name_to_kwarg = {'Group Name': 'agenda',
'Zoom Username': 'host_email'}
# (optional) predicate function to initially process the row data
def process_row(row: 'RowType', dt_format='%Y-%m-%d %I:%M %p'):
start_time = f"{row['Meeting Date'][:10]} {row['Meeting Time']}"
row.update(
start_time=datetime.strptime(start_time, dt_format),
# Zoom expects the `duration` value in seconds.
duration=int(row['Duration Hr']) * 60 + int(row['Duration Min']),
)
return True
# (optional) function to update row(s) with the API response
def update_row(row: 'RowType', resp: dict):
row['Meeting URL'] = resp['join_url']
row['Meeting ID'] = resp['id']
row['Passcode'] = resp['password']
# create meetings with dry run enabled.
zoom.bulk_create_meetings(
col_name_to_kwarg,
excel_file='./meeting-info.xlsx',
default_timezone='America/New_York',
process_row=process_row,
update_row=update_row,
# comment out below line to actually create the meetings.
dry_run=True,
)
if __name__ == '__main__':
main()
Credits
This package was created with Cookiecutter and the rnag/cookiecutter-pypackage project template.
History
0.1.0 (2022-09-06)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zoom-api-helper-0.1.0.tar.gz
.
File metadata
- Download URL: zoom-api-helper-0.1.0.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f1c8511494a1df5865bf47d32f231bc0e568c3b82e4767b611676f7e3b48b5b |
|
MD5 | da78f19fc2ddb1cc2f3ab588bbce1885 |
|
BLAKE2b-256 | 548a203a9ea4ce1360335dc84d750ae325ec3616b03a301ff45b823db0a30aee |
File details
Details for the file zoom_api_helper-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: zoom_api_helper-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f7d04d134b4706cb360cae876098f86e4b89924f92c6e37b5e873c476a45aa7 |
|
MD5 | d5f035680568c35119f7d3d1ffdb9663 |
|
BLAKE2b-256 | 7f3da16326bbe95a243662443800738029efaf5ca121804dbfab1913d4584342 |