Login process overview

Collapse
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts
  • OliasOfSunhillow
    Junior Member
    • Feb 2013
    • 57

    #16
    Agh that seems to have done the trick. The confusion comes with the login button, it looks like you are supposed to enter a session token in order to click login when in fact clicking login throws up a prompt box to login with your userid and password

    Comment

    • OliasOfSunhillow
      Junior Member
      • Feb 2013
      • 57

      #17
      I presume this means that the app key and session token generated can now be used in any program I copy or write to access the API ?

      Comment

      • uncletone1
        Junior Member
        • Oct 2012
        • 24

        #18
        Originally posted by OliasOfSunhillow View Post
        I presume this means that the app key and session token generated can now be used in any program I copy or write to access the API ?
        Certainly the app key will, i'm assuming you would need to get a session token everytime you had to log in.
        If you have any luck programming this (Getting the session token without the visualiser) i'd be grateful for the knowledge. Even better if its in C#

        Tony.

        Comment

        • vic
          Junior Member
          • May 2009
          • 33

          #19
          X509Certificate2 x509certificate = new X509Certificate2("client-2048.p12", "yourp12password");
          The example doesn't work for me cos of this line. I've put my password in where it says "yourp12password" but I'm guessing that is not right. Please correct me someone.

          Comment

          • heja
            Junior Member
            • Nov 2012
            • 20

            #20
            Originally posted by vic View Post
            X509Certificate2 x509certificate = new X509Certificate2("client-2048.p12", "yourp12password");
            The example doesn't work for me cos of this line. I've put my password in where it says "yourp12password" but I'm guessing that is not right. Please correct me someone.
            You should replace "yourp12password" with the password you set when you generated your client-2048.csr file.

            Comment

            • vic
              Junior Member
              • May 2009
              • 33

              #21
              Thank you for your reply heja but I don't recall generating a client-2048.csr file. At the risk of sounding stupid, this is only a bot I want to write for myself not for any clients.

              Comment

              • OliasOfSunhillow
                Junior Member
                • Feb 2013
                • 57

                #22
                I think what we need here is a simple step by step account of how to create your client-2048.csr file, where it go's etc

                Comment

                • heja
                  Junior Member
                  • Nov 2012
                  • 20

                  #23
                  https://api.developer.betfair.com/se...28bot%29+login

                  Comment

                  • vic
                    Junior Member
                    • May 2009
                    • 33

                    #24
                    Ok thanks, I got the wrong end of the stick, all is clear now. It was/is a seismic shift from API6 but like most improvements I suppose it will be easier for us once we get stuck into it.

                    Comment

                    • uncletone1
                      Junior Member
                      • Oct 2012
                      • 24

                      #25
                      Right. I have got the interactive option working as per the instructions for C#

                      https://api.developer.betfair.com/se...op+Application


                      I put a web browser my winform. Have the URL set to
                      http:// identitysso.betfair.com

                      and I catch the return cookie and get the session token. Yay!!

                      My new question... is there a way of sending the U/Name and Password in the URL?

                      I'm guessing as a HttpWebRequest maybe?

                      Comment

                      • AlgoTrader
                        Junior Member
                        • Mar 2012
                        • 243

                        #26
                        The interactive login consists of three steps.

                        1) loading HTML stuff and displaying it from
                        https://identitysso.betfair.com/view/login

                        2) filling fields in HTML form

                        3) sending form data to
                        https://identitysso.betfair.com/api/login

                        All the stuff is optional except of 3. In fact, I don't need HTML from Betfair to display form, the exceptions are countries like Denmark that require extra stuff

                        Working with HTML stuff is not a great deal, just a several JavaScript lines
                        Last edited by Mr Stokes; 22-08-2013, 02:05 PM. Reason: code block removed
                        Betfair Bots Made Easy

                        Comment

                        • uncletone1
                          Junior Member
                          • Oct 2012
                          • 24

                          #27
                          All the stuff is optional except of 3. In fact, I don't need HTML from Betfair to display form, the exceptions are countries like Denmark that require extra stuff

                          Working with HTML stuff is not a great deal, just a several JavaScript lines

                          So how do i format the send

                          https://identitysso.betfair.com/api/login

                          to include the Uname and Password.

                          Comment

                          • AlgoTrader
                            Junior Member
                            • Mar 2012
                            • 243

                            #28
                            Just a regular POST with data like this:

                            username=XXXXX&password=XXXXXX&otherstuff=XXXXX

                            The working example is

                            Code:
                            curl -v -c cookies.txt -d "username=Username&password=password&login=true&redirectMethod=POST&product=home.betfair.int&url=https://www.betfair.com/" https://identitysso.betfair.com/api/login
                            Do you have idea of what curl is?
                            Betfair Bots Made Easy

                            Comment

                            • uncletone1
                              Junior Member
                              • Oct 2012
                              • 24

                              #29
                              Originally posted by AlgoTrader View Post
                              Just a regular POST with data like this:

                              username=XXXXX&password=XXXXXX&otherstuff=XXXXX

                              The working example is

                              Code:
                              curl -v -c cookies.txt -d "username=Username&password=password&login=true&redirectMethod=POST&product=home.betfair.int&url=https://www.betfair.com/" https://identitysso.betfair.com/api/login
                              Do you have idea of what curl is?
                              I know its a form of mark up language but thats as far as it goes (dont know how to write it or implement it). I use C#, so i'm trying to find an example of taking the above and creating a C# sample httpwebrequest (or whatever is required) to achieve the same result.

                              Comment

                              • AlgoTrader
                                Junior Member
                                • Mar 2012
                                • 243

                                #30
                                Originally posted by uncletone1 View Post
                                I know its a form of mark up language but thats as far as it goes (dont know how to write it or implement it). I use C#, so i'm trying to find an example of taking the above and creating a C# sample httpwebrequest (or whatever is required) to achieve the same result.
                                Curl is not a markup language. It is HTTP request testing tool. Before programming any request in any language, it is usually good idea to make it working with curl. You browser is not very good to send post requests with manually prepared data, that's the area where curl shines

                                After curl proto work, just do the same in programminbg language. It usually much easier to implement that you know for sure it works, which headers/cookies to send and what server returns.
                                Betfair Bots Made Easy

                                Comment

                                Working...
                                X