Announcement

Collapse
No announcement yet.

Fail to connect after changing password

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fail to connect after changing password

    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!

  • #2
    hi

    Have you got a password with letters and numbers and a special character in something like"@" ?
    The password requirement is pretty fussy these days

    Comment


    • #3
      Try separating that payload= statement, at least temporarily. Specify your password as a separate variable first and concatenate it onto the payload variable. Have it get displayed somewhere and make sure it's what you think it is.
      Last edited by jabe; 04-06-2021, 02:46 PM.

      Comment


      • #4
        Thanks. I found out that certificates need to be uploaded to my account again.

        The instruction is here, it works for me

        Comment

        Working...
        X