I am trying to connect Informatica cloud from python script and sending POST call to the server. But it is failing with an unknown protocol error.
Code Snippet:
import requests
url = "https://xxxxxx.com/informatica/identity-service/api/v1/Login"
payload="{\r\n \"username\": \"xxxxx\",\r\n \"password\": \"xxxxxx\"\r\n}"
headers1 = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'keyId': 'xxxxxxx'
}
response = requests.request('POST', url, data=payload, headers=headers1, verify=False )
The same POST request is working fine in postman toll and getting response correctly. But hitting with ssl unknown protocol error while invoking post through Python script.
I am executing both Python & Postman in Windows10.
Can anyone assist me to resolve this error?
Error Message:
HTTPSConnectionPool(host='xxxxxx.com', port=443): Max retries exceeded with url: /informatica/identity-service/api/v1/Login (Caused by SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:748)'),))
Python version - 3.6.2 pip version - 21.0.1 openssl version - OpenSSL 1.0.2k