update
This commit is contained in:
parent
0357921e3d
commit
8df69bf1c0
BIN
NorahUniversity/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
NorahUniversity/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
NorahUniversity/__pycache__/settings.cpython-313.pyc
Normal file
BIN
NorahUniversity/__pycache__/settings.cpython-313.pyc
Normal file
Binary file not shown.
BIN
NorahUniversity/__pycache__/urls.cpython-313.pyc
Normal file
BIN
NorahUniversity/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
NorahUniversity/__pycache__/wsgi.cpython-313.pyc
Normal file
BIN
NorahUniversity/__pycache__/wsgi.cpython-313.pyc
Normal file
Binary file not shown.
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
BIN
recruitment/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/admin.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/admin.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/apps.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/apps.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/dashboard.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/dashboard.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/forms.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/forms.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/models.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/models.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/serializers.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/serializers.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/urls.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/utils.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/utils.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/views.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/__pycache__/views_frontend.cpython-313.pyc
Normal file
BIN
recruitment/__pycache__/views_frontend.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/management/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
recruitment/management/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
recruitment/migrations/__pycache__/0001_initial.cpython-313.pyc
Normal file
BIN
recruitment/migrations/__pycache__/0001_initial.cpython-313.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
recruitment/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
recruitment/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
40
run.py
Normal file
40
run.py
Normal file
@ -0,0 +1,40 @@
|
||||
import requests
|
||||
import jwt
|
||||
import time
|
||||
|
||||
ZOOM_API_KEY = 'OoDRW3uVTymEnnQWTZTsLQ'
|
||||
ZOOM_API_SECRET = 'ZJ0hCFMrwekG71jbR3Trvoor4tK3HAVP'
|
||||
|
||||
def generate_zoom_jwt():
|
||||
payload = {
|
||||
'iss': ZOOM_API_KEY,
|
||||
'exp': time.time() + 3600
|
||||
}
|
||||
token = jwt.encode(payload, ZOOM_API_SECRET, algorithm='HS256')
|
||||
return token
|
||||
|
||||
def create_zoom_meeting(topic, start_time, duration, host_email):
|
||||
jwt_token = generate_zoom_jwt()
|
||||
headers = {
|
||||
'Authorization': f'Bearer {jwt_token}',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
data = {
|
||||
"topic": topic,
|
||||
"type": 2,
|
||||
"start_time": start_time,
|
||||
"duration": duration,
|
||||
"schedule_for": host_email,
|
||||
"settings": {"join_before_host": True}
|
||||
}
|
||||
url = f"https://api.zoom.us/v2/users/{host_email}/meetings"
|
||||
return requests.post(url, json=data, headers=headers)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
topic = "Your Meeting Topic"
|
||||
start_time = "2023-08-25T10:00:00"
|
||||
duration = 60
|
||||
host_email = "your_zoom_email"
|
||||
response = create_zoom_meeting(topic, start_time, duration, host_email)
|
||||
print(response.json())
|
||||
Loading…
x
Reference in New Issue
Block a user