一、注册一个免费的Zoom账号(zoom.us)
二、在Zoom 应用市场(App Marketplace)创建一个server to server 的app,授予创建会议的权限。
三、创建一个Zoom API的服务端程序(node.js)
1、git clone https://github.com/zoom/server-to-server-oauth-starter-api
2、cd server-to-server-oauth-starter-api
3、npm install
4、cp .env.example .env
5、配置环境变量
6、配置redis
7、启动redis
8、启动zoom api服务端
npm start dev
四、创建一个Zoom API的客户端程序(python)
1、创建一个python客户端
#client.py
import requests
import json
from datetime import datetime, timedelta
def create_meeting():start_time = datetime.utcnow() + timedelta(days=1) # 会议开始时间设为明天print(f"Start time: {start_time.strftime('%Y-%m-%dT%H:%M:%SZ')}") # 调试信息response = requests.post(f'http://localhost:8080/api/meetings/{你的userId}', data=json.dumps({'topic': 'Zoom Meeting','type': 2, # Scheduled meeting'start_time': start_time.strftime('%Y-%m-%dT%H:%M:%SZ'),'duration': 60, # 会议时长60分钟'timezone': 'UTC','settings': {'join_before_host': True,'host_video': True,'participant_video': True,'mute_upon_entry': True,'approval_type': 0, # Automatically approve'audio': 'both','auto_recording': 'none'}}))print(f"Create meeting response: {response.text}") # 调试信息if response.status_code == 201:return response.json()else:raise Exception(f"Failed to create meeting: {response.text}")
def main():try:meeting_info = create_meeting()print(f"Meeting created successfully: {meeting_info}")except Exception as e:print(f"Error: {e}")if __name__ == '__main__':main()
2、启动python client.py
即可创建一个会议,点击会议地址(如:https://us05web.zoom.us/j/81600085150?pwd=ipNz3msUQbMsgagu2IJw5RNIIvyC3G.1)即会调用本地已Zoom客户端加入会议(没有客户端会自动下载一个)