Forums

SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Getting below SSL3 Certificate Error. Code works on local machine , localtunnel and other providers. ANyone know what the issue is?

>   File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py",
> line 1044, in connect
>     raise SSLHandshakeError(e) SSLHandshakeError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

My Code:

url = 'https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=%s&client_secret=%s&fb_exchange_token=%s' % (
    app_id, app_secret, access_token)
h = httplib2.Http()
result = h.request(url, 'GET')[1]

httplib doesn't work well with our proxy when using https. Use requests.