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