الملفات
codepill-sfu/app/api/join/join.py
2022-01-02 14:32:28 +01:00

28 أسطر
495 B
Python

import requests
import json
API_KEY = "mirotalksfu_default_secret"
MIROTALK_URL = "http://localhost:3010/api/v1/join"
headers = {
"authorization": API_KEY,
"Content-Type": "application/json",
}
data = {
"room": "test",
"name": "mirotalksfu",
"audio": "true",
"video": "true",
}
response = requests.post(
MIROTALK_URL,
headers=headers,
json=data,
)
print("Status code:", response.status_code)
data = json.loads(response.text)
print("join:", data["join"])