Python: "certificate verify failed: self signed certificate in certificate chain"
I am trying to connect to Box programmatically from Python. I created a new Box Developer custom app using OAuth 2.0 authentication, and when I submit the below code I am getting the error that you see below. I am not too well-versed in certificates, so could someone help me out?
Note: I already searched the developer forum and read similar posts, such as Certificate Verify Failed – Box Support and SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed – Box Support, however none that I found actually describes how to solve the problem.
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from boxsdk import OAuth2, Client
>>> TOKEN='*****************'
>>> auth=OAuth2(None,None,access_token=TOKEN)
>>> box = Client(auth)
>> me = box.user().get()
←[31mRequest "GET https://api.box.com/2.0/users/me" failed with SSLError exception: SSLError(MaxRetryError("HTTPSConnectionPool(host='api.box.com', port=443): Max retries exceeded with url: /2.0/users/me (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))"))←[0m
-
Official comment
Hi Dane,
This is probably due to some proxy server in your company.
Encourage you to take a look at Python SDK Github page. There is the same question - https://github.com/box/box-python-sdk/issues/725Comment actions
Post is closed for comments.
Comments
1 comment