cant get token from openvidu-server with flask, SSLError appears

266 Views Asked by At
 class GetTokenApi(Resource):
     def get(self):
            openvidu = OpenVidu('https://localhost:4443/', 'MY_SECRET')
            session = openvidu.create_session()
            token = session.generate_token()
            return success_result({'token': token}), 200

after call of this api, shows " requests.exceptions.SSLError: HTTPSConnectionPool(host='localhost', port=4443): Max retries exceeded with url: /api/sessions (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1076)')))"

1

There are 1 best solutions below

0
On

I could imagine you’re deploying OpenVidu with a self-signed certificate. You need to accept this self-signed certificate of openvidu-server the first time try to join a video-call.

You can read how to start with OpenVidu for more info.