Connecting to Confluence via Python: SSL error

I’m trying to connect via the api to our Confluence server.

when i try to connect, i get this error:

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)

to solve this, when i have been connecting to the bitbucket api, i am using

config='http.sslVerify=false'.

i have been trying to find something like that for the Confluence api, but the only things i can find are for Jira, which suggests using

options={'verify': False}

in the constructor, but that doesn’t seem to work for the Confluence constructor.

does anyone have any advice about this? my project is dead in the water if i can’t make the connection.

thank you,
-timothy

1 Like

Hi, did you get any further with troubleshooting this error? I have also encountered the same and was wondering if there was a solution. Thanks

Generally SSL cert errors like this are because your python install doesn’t trust your corporate certs/vpn/whatever. Consider seeking out resources like this stackoverflow post:

1 Like

If you use atlassian packet, then you can turn ssl verify off by

verify_ssl = False

For Example

from atlassian import Confluence
confluence = Confluence(
   url='https://my.site',
   username = confluence_login,
   password = confluence_password,
   verify_ssl = False
   )
if confluence.verify_ssl:
    print('ssl verify is on')
else:
    print('ssl verify is off')
    import urllib3
    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
1 Like