Issue with ticket search using python code

I tried to search for a ticket in RT using the API in my python code but it’s showing the following error.

requests.exceptions.SSLError: HTTPSConnectionPool(host=‘rt.reflectionsinfo.com’, port=443): Max retries exceeded with url: /REST/1.0/ticket/22508?user=akhilsiby&pass=Ajithjoseph@1995 (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)’)))

But when I tried this from postman it is working. I am adding the postman request screenshot below. Can someone please help me?

SSL assumes port 443 over HTTPS but it looks like your example in Postman is HTTP

I tried with both HTTPS and HTTP. But I got the same error in both cases.

Without seeing the Python code I don’t believe we can help a ton since it doesn’t seem to be an RT issue

Ticket_No = Entity
url = “http://rt.reflectionsinfo.com/REST/1.0/ticket/{}?user=akhilsiby&pass=password”.format(Ticket_No)
payload = {}
headers = {
‘Cookie’: ‘RT_SID_rt.reflectionsinfo.com.80=adb3e3ace5e8b95436cec555559bb57c’
}

response = requests.request(“GET”, url, headers=headers, data=payload)

above given is the python code part where I am connecting to the rt and trying to search for the ticket

I guess the obvious question from the original error message is “do you have a valid, non-self-signed certificate on your web server”?

Also if you use that RT web cookie, I am guessing that’ll result in the cross site warning

thank you for the responses. I added “verify=false” in the response along with URL and headers and it’s working now.