Non-Interactive login - CERT_AUTH_REQUIRED

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snowmoneky
    Junior Member
    • Feb 2014
    • 18

    #1

    Non-Interactive login - CERT_AUTH_REQUIRED

    I've followed the instructions and set up a certificate and uploaded it to https://myaccount.betfair.com/accoun...tion?showAPI=1. When I run the curl command with my login and app-key to test it I get :

    {"loginStatus":"CERT_AUTH_REQUIRED"}

    I've tried importing the cert into the java key-store but get exactly the same error from my java program.

    And idea what to do next.
  • AlgoTrader
    Junior Member
    • Mar 2012
    • 243

    #2
    Can you please provide HTTP request headers and body?
    Betfair Bots Made Easy

    Comment

    • Hamlet6
      Junior Member
      • Jan 2014
      • 9

      #3
      If you are using the curl command line program you need to set the --cert and --key flags to your .crt and .key files respectively.

      Comment

      • PT_PT
        Junior Member
        • Nov 2012
        • 17

        #4
        This command from the documentation works fine for me
        Code:
        curl -q -k --cert client-2048.crt --key client-2048.key https://identitysso.betfair.com/api/certlogin -d "username=testuser&password=testpassword" -H "X-Application: curlCommandLineTest"

        Comment

        • snowmoneky
          Junior Member
          • Feb 2014
          • 18

          #5
          Thanks, I followed the instructions - the curl command simply doesn't seem to work on a mac. It's not super important, the same code works fine - I was just wondering why CURL didn't work.

          Comment

          • rxelgin
            Junior Member
            • Sep 2015
            • 14

            #6
            Same problem: curl test of url does not work

            Hi

            Apologies for what may be a simple problem.

            I followed the Betfair instructions on how to create, sign and upload a certificate.

            However, I get a CERT_AUTH_REQUIRED error when I use the following command:

            curl -q -k --cert client-2048.crt --key client-2048.key https://identitysso.betfair.com/api/certlogin -d "username=testuser&password=testpassword" -H "X-Application: curlCommandLineTest"

            PLEASE NOTE: I have put in my username, my password and the KEY of my application in the above command. For my key I put in the delayed key i.e. the value of the 1.0-DELAY entry when I select the getDeveloperAppKeys on https://developers.betfair.com/visua...nt-operations/

            Any suggestions?

            Thanks
            Last edited by rxelgin; 11-09-2016, 09:52 PM.

            Comment

            • MH47
              Junior Member
              • Dec 2018
              • 1

              #7
              Did anyone have an answer to rxelgin last comment, I am getting the exact same.

              Comment

              • rxelgin
                Junior Member
                • Sep 2015
                • 14

                #8
                I found a solution to the above problem that I was having. The solution was to put in the full path name of where I was storing my .crt and .key files i.e.

                curl -q -k --cert /home/bf/client-2048.crt --key home/bf/client-2048.key https://identitysso.betfair.com/api/certlogin -d "username=testuser&password=testpassword" -H "X-Application: curlCommandLineTest"

                Comment

                • newbie99
                  Junior Member
                  • Dec 2018
                  • 62

                  #9
                  Originally posted by rxelgin View Post
                  I found a solution to the above problem that I was having. The solution was to put in the full path name of where I was storing my .crt and .key files i.e.

                  curl -q -k --cert /home/bf/client-2048.crt --key home/bf/client-2048.key https://identitysso.betfair.com/api/certlogin -d "username=testuser&password=testpassword" -H "X-Application: curlCommandLineTest"
                  Oddly, although I can connect using the simple Python code, I still can't use the basic curl above.

                  Arguably it doesn't matter, as I can connect, but it really bugs me when I don't understand why things don't work, so I'd love to know if anyone else who has the same issue still can't get it to work (even putting the full file path to the certs).

                  For reference I get an HTTP Error 400, rather than the errors most people seem to get, so it is probably a parsing error (I think), as what I get back looks like HTML, rather than an actual error message from the server.

                  Comment

                  • newbie99
                    Junior Member
                    • Dec 2018
                    • 62

                    #10
                    Originally posted by newbie99 View Post

                    Oddly, although I can connect using the simple Python code, I still can't use the basic curl above.

                    Arguably it doesn't matter, as I can connect, but it really bugs me when I don't understand why things don't work, so I'd love to know if anyone else who has the same issue still can't get it to work (even putting the full file path to the certs).

                    For reference I get an HTTP Error 400, rather than the errors most people seem to get, so it is probably a parsing error (I think), as what I get back looks like HTML, rather than an actual error message from the server.
                    Really oddly, I am now getting the CERT_AUTH_REQUIRED message.

                    I am using the correct (new endpoint) and the .crt and .key file (for some reason .pem files cause to many issues, so I gave up with that) work, as I can login using the python test code with that cert / key combo.

                    So, given I've copy/pasted the code above, but putting in my own cert path (in full) and username / password, all of which I know are correct.

                    What else could I be doing wrong?

                    Comment

                    • Apitester
                      Junior Member
                      • Apr 2019
                      • 2

                      #11
                      Originally posted by newbie99 View Post

                      Oddly, although I can connect using the simple Python code, I still can't use the basic curl above.

                      Arguably it doesn't matter, as I can connect, but it really bugs me when I don't understand why things don't work, so I'd love to know if anyone else who has the same issue still can't get it to work (even putting the full file path to the certs).

                      For reference I get an HTTP Error 400, rather than the errors most people seem to get, so it is probably a parsing error (I think), as what I get back looks like HTML, rather than an actual error message from the server.
                      Having the error: curl: (58) unable to set private key file: 'client-2048.key' type PEM

                      newbie99

                      Could you post the example python code that works for you? Thanks

                      Comment

                      • mdevlin
                        Junior Member
                        • Jan 2021
                        • 2

                        #12
                        Anybody have any luck with this? I get same issue when I try to run the sample BetfairClient from https://github.com/joelpob/jbetfairn...airClient.java
                        CERT_AUTH_REQUIRED is the loginStatus. This same code used to work just fine for me a year ago.

                        Comment

                        Working...
                        X