#community-help

Accepting Self-Signed Certificates in Typesense Python API

TLDR Rotfisch is having issues with Python API and self-signed certificates in Typesense. Kishore Nallan informs that it's not possible with the official client and suggests creating a custom HTTP client.

Powered by Struct AI

1

Mar 15, 2023 (9 months ago)
Rotfisch
Photo of md5-4fdfd972be680409429627667fd6b8bf
Rotfisch
10:46 AM
I changed the protocol of my typesense server from http to https with self-signed Certificates. Requests from the Browser with typesense js docsearch are still working, command line request with the python API are not working:

Max retries exceeded with url: /collections (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:997)')))

Is there a way to trust self-signed Certificates in Python API?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:48 PM
Not possible with official Typesense client because the underlying http client configuration is not exposed. You can make your own API call with custom http client that is configured to accept self signed certs which are not accepted by default.

1