Zoom API client for Python using server to server tokens
Project description
Zoom Python client
⚠️ WIP: This project is a WIP and therefore may contain bugs. Use it at your own risk and keep this in mind if you decide to use it in production environments.
Zoom API Python client with support for Server to Server Oauth tokens
Usage
Defining your env variables
Define the following variables in your env
or your .env
file:
- ZOOM_ACCOUNT_ID
- ZOOM_CLIENT_ID
- ZOOM_CLIENT_SECRET
Initialize the ZoomApiClient from environment variables
from src.zoom_python_client.zoom_api_client import ZoomApiClient
zoom_client = ZoomApiClient.init_from_env()
Initialize the ZoomApiClient from .env
from src.zoom_python_client.zoom_api_client import ZoomApiClient
zoom_client = ZoomApiClient.init_from_dotenv()
Initialize the ZoomApiClient manually
from src.zoom_python_client.zoom_api_client import ZoomApiClient
zoom_client = ZoomApiClient(
account_id="<YOUR ACCOUNT ID>",
client_id="<YOUR CLIENT ID>",
client_secret="<YOUR CLIENT SECRET>")
Use the file system to store the access token instead of environment
There are some cases where you might want to store the access token in the file system in order to share its value with other elements of the application (Ex. different pods on a Kubernetes/Openshift application).
You can define the path where the token will be stored, passing the use_path
variable to the constructor:
from src.zoom_python_client.zoom_api_client import ZoomApiClient
zoom_client = ZoomApiClient(
account_id="<YOUR ACCOUNT ID>",
client_id="<YOUR CLIENT ID>",
client_secret="<YOUR CLIENT SECRET>",
use_path="/path/to/token/folder")
How to make API calls
MEETING_ID = "12345"
USER_ID = "abcdfgh"
result = zoom_client.users.get_user(USER_ID)
print(result)
result = zoom_client.meetings.get_meeting(MEETING_ID)
print(result)
Optional: How to configure the logging
from zoom_python_client.zoom_api_client import ZoomApiClient
setup_logs(log_level=logging.DEBUG)
Available endpoints
users:
- get user details
- get user meetings
meetings:
- get meeting details
- get meeting token
meeting live streams:
- get meeting live stream
- update live stream
- update livestream status
webinars:
- get webinar details
webinar live streams:
- get webinar live stream
- update webinar live stream
- update webinar livestream status
Project details
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_python_client-0.0.6.tar.gz
.
File metadata
- Download URL: zoom_python_client-0.0.6.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d71a8eb0b119861d0048a69331e4a8d8a302bddb058ecdd2a494f909ea4625b |
|
MD5 | af40c9163af361fcdcc7d6253087f842 |
|
BLAKE2b-256 | 4ef4ec9919bb9f106be8592343aa07e35c7d34239aa697ffd5310ecab5a94b48 |
File details
Details for the file zoom_python_client-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: zoom_python_client-0.0.6-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 281aceb0d3b616ce252c805ef0b2c7fa7e01185d43b8fa8cf1eb56af3ac105c5 |
|
MD5 | 50cdaf26e105ee07837cd254c29e630f |
|
BLAKE2b-256 | f9605bf8731da6760a3264b1707e8378185494dc9adb058a295a0e1843a687cc |