Betfair API (5.0 & 6.0) Retirement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OzPunter
    Junior Member
    • Apr 2009
    • 161

    #1

    Betfair API (5.0 & 6.0) Retirement

    I have just been informed thru one of my clients that emails are being sent to all API 6 users that the API will be retired 1st November 2014.

    I've been so busy with other things I haven't keep pace with the JSON developement, so now I need to catch up pronto.

    I downloaded the Dephi example that I couldn't get running so has anybody got working Delphi version that will get me started?

    Otherwise I'll just have to spend the time to figure it out..

    Time poor.
    OzPunter
  • forumbdpwebadmin
    Forum Administrator
    • Sep 2008
    • 26

    #2
    Hi OzPunter.

    There is a Delphi sample available via https://github.com/jamiei/Betfair-API-NG-Sample and a Delphi library available via https://github.com/betfair/API-NG-Delphi-Client

    Kind Regards

    Neil

    Comment

    • OzPunter
      Junior Member
      • Apr 2009
      • 161

      #3
      Thanks Neil,

      I have already looked into those, but didn't get much time to delve into them throughly, I'll try again.

      Right now my main concern is what type of SSL certificate should I invest in.. Or can I use a free SSL certificate?

      Any suggestions?

      Comment

      • BetfairDeveloperProgram
        Administrator
        • Oct 2008
        • 680

        #4
        Hi OzPunter,

        Our instructions for non-interactive login use openSSL (http://www.openssl.org/) which is free.

        Thanks

        Neil

        Comment

        • OzPunter
          Junior Member
          • Apr 2009
          • 161

          #5
          Thanks Neil,

          Slowly it's starting to make sense.

          As someone else said it’s a bit like walking in a scary dark forest without a torch.

          Still… by the inch it’s a cinch, by the yard it’s hard.

          I’ll inch my way though this one step at a time. Once I get past the Login stuff, I recon I’ll fly, but steady as she goes, one step at a time, I need to understand the mechanics of every step otherwise there’s all those nagging doubts when I see a problem…

          I think the new API-NG is going to cause you guys some serious headaches. Some serious hand holding will be required I think.

          Kind Regards
          OzPunter

          Comment

          • OzPunter
            Junior Member
            • Apr 2009
            • 161

            #6
            The Login process for the New API-NG

            The Login process for the New API-NG has really got me stumped; there are just too many mysteries.

            Firstly, a couple of weeks ago I went through the complex process of creating an Application Key for a test application and after much confusion I eventually got the application keys and in particular the SSIOD session key.

            I then stopped at that point thinking that I would be able to continue on with that data later.

            Now I have restated my attempts to create a login and I thought I’d go over the application key creation steps again with the Accounts API Visualiser. This time I got no progress at all.

            I tried the previous SSIOD session and I got an INVALID_SESSION_INFORMATION error. What? This was valid last week, and now it’s not? Does that mean I have to create a new SSIOD every time I start my application? Surely not.

            I then logged into BetFair in my Firefox browser and got a new SSOID session key and tried using that, this time I get API_KEY_CREATION_FAILED.

            I tried the same process several times on two computers and got the same result.
            So in the end I ditched that idea because working alone I’m simply not going to have the time to work out what the problem is.

            The next trick is even more frustrating. I went hunting for how to create an Interactive login, which I will probably end up using if I can get it to work because the SSL certificate process is seriously convoluted and time consuming.

            I then found the link to the BetFair Betfair IdentitySSO login page which seems to be the new required method of logging in. Next I embedded that page into my application and set about decoding the returned Post Data (a neat trick in itself)

            The message I got back was “We are experiencing some technical issues and unable to proceed with your login. Please try again later” Does that mean my login was rejected??? Or does that mean the website is having a problem???

            The Post Data I decoded was my login details, the application key that I had loaded although I’m not sure which key I should be using and an enormous BetFair Blackbox URL that starts out “https%3A%2F%2Fwww.betfair.com&ioBlackBox=” etc and would be around 2k bytes long.

            I was using the Application Key that I generated a couple of weeks ago so it occurred to me that as a test I should try a garbage key and see what I get back… I got back the same error message. Does that mean the site is down? Or is my attempts rejected?

            Without knowing exactly what these responses mean and wether I’m sending the right information it’s a real mystery exercise and the data I’m getting back doesn’t comply with any messages listed in the instructions.

            The post data I got back was my login information a “redirectMethod=POST”, the application key I submitted and this enormous URL with no “Success or Fail” message at all.

            If anyone has the Interactive login working perhaps that can enlighten me.

            Kid Regards
            OzPunter


            As a foot note, I just tried the Delphi Example client program
            and it gave me the same "We are experiencing some technical issues and unable to proceed with your login. Please try again later" message, so perhaps it is time for the Pool...

            Try again later..
            Last edited by OzPunter; 07-09-2014, 06:06 AM.

            Comment

            • betdynamics
              Junior Member
              • Sep 2010
              • 534

              #7
              Your AppKey is a fixed value - it is the application key associated with that application. You can use that value without modification in each call that you make to the API.

              Your Session ID is a variable value and is created each time you log in. Therefore, you need to extract it from the returned broswer response every time you log in to your application.

              The log in process works well, so if you are getting an error it is most likely caused by your code.

              Although I haven't looked at Delphi for about 10 years, if you post your code I'll compare it to my C# code and see if I can spot anything.

              Comment

              • bnl
                Junior Member
                • Nov 2012
                • 108

                #8
                Originally posted by OzPunter View Post
                The Login process for the New API-NG has really got me stumped; there are just too many mysteries.

                ...

                If anyone has the Interactive login working perhaps that can enlighten me.
                This is how I login. It is pascal-ish, it is Ada,
                so you probably get the general idea

                http://forum.bdp.betfair.com/showpos...28&postcount=2

                /Björn

                Comment

                • OzPunter
                  Junior Member
                  • Apr 2009
                  • 161

                  #9
                  Originally posted by betdynamics View Post
                  Your AppKey is a fixed value - it is the application key associated with that application. You can use that value without modification in each call that you make to the API.

                  Your Session ID is a variable value and is created each time you log in. Therefore, you need to extract it from the returned broswer response every time you log in to your application.

                  The log in process works well, so if you are getting an error it is most likely caused by your code.

                  Although I haven't looked at Delphi for about 10 years, if you post your code I'll compare it to my C# code and see if I can spot anything.
                  Dear BetDynamics,
                  Thanks for your input. The fact that my code could be the cause certainly occured to me so I downloaded the excellent example code at https://github.com/betfair/API-NG-Delphi-Client and it compiled in DXE6 easily.

                  The result that I got was identical to what my code returned, therefore I feel that my code attempts can't be that bad.

                  The result I got back was:

                  username=<My_UserName>

                  &password=<My_Password>

                  &login=Login&redirectMethod=POST

                  &product=<The_Product_Key_I_submitted>

                  &url=https3A%2F2Fwww.betfair.comioBlackBox=0400AY1 YRP7DGIANf94lis1ztpRNmiaNjbTAcE%2FqHZPLjayHqQKObyI jvgnH2pLD%2FStf2xL349v1amFkugE7vWwk%2Fz%2FKhUgGeNq KfeXqFvOptJOPLKV1ry22F%2BrSq3ScPP1p17EaibinPUZuHTK UkZ8zWbl1IO8WxD1KhEU387Lj8zVxlU%2BEsEIGZ6sMqPPgX1W 2Usr8e2CCHThBhr1Q43iUIrbRn%2BsnrvqSrw%2BSeKfbN%2BZ XOaNJhRThT9%2FjmHjRmBZ%2FGwRA9sjfh7R8s6WQ%2BPAvKoJ ahNX4Xe6bX2UaoxTgOo9P27C2ZVTEkLpahNX4Xe6bXcjNbTCSt j%2F31CYi%2BTBqr3g2vHHGOZYr7JOhYOG1lLdW3%2BtQ80z9b p2%2BjD74LLkbs6GIjjk%2FFOZpjGQ6fVQXUP2DCbiVr2J2RPO Ye85lXFCRVkQYN9Ly6RnTiGIBwv90GlAaPgTkXZKTvJkdtP6Fq n2k1wIjyYQ3Oyn9oYcKrLSfq4WCiHMbq2JhPqZBfZoNYV82rwl wF%2BJTV4d%2BRnQegnNK3Sga2t5uGNd3C72R708R81J85T%2F W0UHYCS7UkB6%2FI35NJJFQGYt%2BsxV3%2ByzOn702ZqhAazR aNCXaiWs2BQ0%2BFTjhj%2FPUlmkcOjS9hgMLfbLOSjLND7KBt rNHzt95ePknnCCwgv5Q8ZzPFR3aLSeUs%2FJ0glNig9t3qfKvk ZztUxesfxXV871ILuV2UGFOpoPjmHjRmBZ%2FGeFqbbvaWL9y3 wiFUh3z5ufjmHjRmBZ%2FGbotQL6e83sr%2B0hBFO7xRI8SmRZ OWcyLmG3PFwRkerLhJSkYJNTlGEP6xlsgxNpUCgnuJ8KtUUl7u PKQ%2BQ1tcCAvswfG3ZEef6%2BRScM8yeFKZZDBxClcuKgrp%2 FkRsC8Z3YZPfM4xClLrjQMuJA%2BHidAfLTV8Zrg1H2xi%2Fj8 MamCLmx2vNwg2QeplkO3XtNRNHvYyLEGhiJGorsTEwJIeTA4TE uOktbe2U%2FrX2Wv56umXkuuAFPyMOeIL5kL%2B6EqUeDa8ccY 5livsk6Fg4bWUt1bf61DzTP1unb6MPvgsuRuzoYiOOT8U5mmMZ Dp9VBdQ%2FhFKrvFvB4HX4YsxA5VjoCUc6fZ2HUw%2FP

                  The responses should have complied with those listed here https://api.developer.betfair.com/se...op+Application and that is simply not the case.

                  Other than that there is a message retruned on the web page saying "We are experiencing some technical issues and unable to proceed with your login. Please try again later"

                  So maybe the site is kaput, and I should try again in 24 hours?

                  Comment

                  • OzPunter
                    Junior Member
                    • Apr 2009
                    • 161

                    #10
                    Thankyou bnl,

                    I lokked at your code and without transcribing it over to Delphi I can see that it follows a similar flow to my code and the code in the clinet example.

                    Thankyou again and remember to be sure any code you paste here dosen't contain your private details..

                    Kind Regards
                    OzPunter

                    Comment

                    • betdynamics
                      Junior Member
                      • Sep 2010
                      • 534

                      #11
                      Have you had your AppKey white listed?

                      The AppKey must be whitelisted by BDP before it can be used to log in. Email bdp@betfair.com and they can check the status of your AppKey for you.

                      Comment

                      • OzPunter
                        Junior Member
                        • Apr 2009
                        • 161

                        #12
                        Originally posted by betdynamics View Post
                        Have you had your AppKey white listed?

                        The AppKey must be whitelisted by BDP before it can be used to log in. Email bdp@betfair.com and they can check the status of your AppKey for you.
                        Dear BetDynamics,
                        Thankyou for your response,

                        I applied for "White Listing" and I have an email saying that it will be listed in the next 48 hrs.

                        What I don't understand is why the response that I'm getting doesnt contain any of the messages that are listed as possible responses.

                        I would think the "Not WhiteListed" should be added to the LoginStatus responses if that's the cause of the problem.

                        I'll give it 48 hrs and try again...

                        Comment

                        • bnl
                          Junior Member
                          • Nov 2012
                          • 108

                          #13
                          Originally posted by OzPunter View Post
                          Thankyou again and remember to be sure any code you paste here dosen't contain your private details..

                          No problem. The commented ssoid is invalid since about a year
                          or so, and the appkey is fake. Notice the letter 'ö' in it.

                          But thanks for the concern
                          /Björn

                          Comment

                          • OzPunter
                            Junior Member
                            • Apr 2009
                            • 161

                            #14
                            Originally posted by bnl View Post
                            No problem. The commented ssoid is invalid since about a year
                            or so, and the appkey is fake. Notice the letter 'ö' in it.

                            But thanks for the concern
                            /Björn
                            No worries BNL,

                            Allways on the lookout for slipups. Thanks for your input I think I have sucess with my login now, it must have been the site or the white listing that was causing my problems.

                            Comment

                            • OzPunter
                              Junior Member
                              • Apr 2009
                              • 161

                              #15
                              Originally posted by OzPunter View Post
                              Dear BetDynamics,
                              Thankyou for your response,

                              I applied for "White Listing" and I have an email saying that it will be listed in the next 48 hrs.

                              What I don't understand is why the response that I'm getting doesnt contain any of the messages that are listed as possible responses.

                              I would think the "Not WhiteListed" should be added to the LoginStatus responses if that's the cause of the problem.

                              I'll give it 48 hrs and try again...

                              Yep.. Recieved an Email today saying that my white listing had been activated and lookie there my program works..

                              Now I have to get stuck into the serious bits.. When I get time of course..

                              Thanks everyone.. You've been very helpful

                              Comment

                              Working...
                              X