Hallo all. I’m trying to connect to OpenVidu server from my fastapi. Sending a get request to retrieve the sessions through this https://
YOUR_OPENVIDUSERVER_IP /openvidu/api/sessions
. I’m getting a 200 response but also i’m getting a 401 error inside a dict {"timestamp":"2021-02-18T15:44:47.893+00:00","status":401,"error":"Unauthorized","message":"","path":"/openvidu/api/sessions"}
I’m using requests library. Here is my code
@app.get(“/redirect”)
async def read_openvidu():
url = ‘https://20.1.70.10/openvidu/api/sessions’
payload_to_encode = “user:pass”
payload_to_encode_bytes = payload_to_encode.encode(‘ascii’)
base64_payload_to_encode_bytes = base64.b64encode(payload_to_encode_bytes).decode(“UTF-8”)headers = {'Authorization': f'Basic {base64_payload_to_encode_bytes}'} r = requests.get(url, headers=headers, verify=False) return r.cookies
Also i’m not able to get past without verify=False
. Because of SSL failure. What is the best workaround? Any help would be appreciated.