Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to use REST API to get data from my server, but I'm stuck with a error when using Pycharm. This is the basic code I need:

import requests
url = "https://XXXX.emea.com/api/operational/global/callCountStatus/activeCalls"
payload={}
headers = {
'Authorization': 'Basic ZXVfdm9pY2VfYXBpOkR0Ml9HUWx5' }
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)

But when I run this command, I have the following output error:

requests.exceptions.SSLError: HTTPSConnectionPool(host='fdxsbc01.emea.fedex.com', port=443): Max retries exceeded with url: /api/operational/global/callCountStatus/activeCalls (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))

I found some stuffs on internet, like creating a file pip.ini.....but nothing is working.

Any guess what I should tackle?

I'm using Windows, Python 3.8 and PIP 21.0.1 (Using postman, it works fine)

Thanks

question from:https://stackoverflow.com/questions/66050465/python-rest-api-ssl-issuer-certificate-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
250 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...