I have changed my account password today and afterwards. I failed to connect to the Exchange API. I have double checked that I have the correct username, password and certificates. My code looks like this:
payload = 'username=myusername&password=mypassword'
app_key = 'my_app_key'
headers = {'X-Application': app_key, 'Content-Type': 'application/x-www-form-urlencoded'}
resp = requests.post('https://identitysso-cert.betfair.com/api/certlogin',data=payload,cert=('../src/certs/TestApp1.crt','../src/certs/client-2048.key'),headers=headers)
print(resp)
json_resp=resp.json()
print(json_resp)
When I execute, I got the message {'loginStatus': 'CERT_AUTH_REQUIRED'}.
could someone provide a good advice on this? Thanks!
payload = 'username=myusername&password=mypassword'
app_key = 'my_app_key'
headers = {'X-Application': app_key, 'Content-Type': 'application/x-www-form-urlencoded'}
resp = requests.post('https://identitysso-cert.betfair.com/api/certlogin',data=payload,cert=('../src/certs/TestApp1.crt','../src/certs/client-2048.key'),headers=headers)
print(resp)
json_resp=resp.json()
print(json_resp)
When I execute, I got the message {'loginStatus': 'CERT_AUTH_REQUIRED'}.
could someone provide a good advice on this? Thanks!


Comment