Announcement

Collapse
No announcement yet.

Invalid Session Information

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

  • Invalid Session Information

    Yesterday my c# app, accessing the betfair api via the free app key was working fine. Now, today, I keep getting the above error(Invalid Session Info) If I log onto the betfair website I get a different ssoid to the one that my c# app gets. . Also, the ssoid that my c# app receives has the word '/Secure' attached to the end of it, which is something I don't recall occuring before. This is a copy of the ssoid that my c# recieves
    ssoid=YZnZCvA+++++++++++o=; Domain=.betfair.com; Path=/; Secure
    (with some chars replaced by me with the + sign )
    If I paste the ssoid from the betfair website into my app all works as it should. So that suggests that the uri and user params, password etc are all correct. Why then should the call from my c# app be producing an ssoid that betfair api does not accept? Thanks for all and any help.

  • #2
    I am having the same issue using vb.net.

    Comment


    • #3
      Exact same issue for me, also running vb.net via MS Visual Studio

      Comment


      • #4
        Since about 5pm Australian Time I began having issues as well.

        I make my call to https://identitysso.betfair.com.au/api/

        I began getting a "; Secure" message appended to the ssoid item in the login response:

        "ssoid=ZZZZZZ? =; Domain=.betfair.com.au; Path=/; Secure"

        This resulted in the error INVALID_SESSION_INFORMATION

        Until today the "Secure" component was not there, it is simple to work around by splitting the ssoid and using the first item.

        sessToken = ssoid.ToString.Split(";")(0)

        FYI
        Last edited by Bascoe; 17-08-2020, 12:39 PM.

        Comment


        • #5
          Thanks for that. I was stripping out the word "Secure" but not the semi colon that preceded it. So stripping out "; Secure" from the response worked for me. Hope it helps others. Thanks again for the reply.

          Comment


          • #6
            OK, think I might have sussed this (although OP basically got it as well, to be fair).

            Basic problem - the API response string returning the ssoid now has the word "Secure" added to the end of it.

            So if you are using string handling functions to strip the irrelevant characters out of this string so that you can just identify the ssoid, you may need to amend them.

            Specifically, I used to use the following VB line to strip out irrelevant characters from the end of the API response:
            sessToken = sessToken.Replace("; Domain=.betfair.com; Path=/", "")

            That now needs updating to the following:
            sessToken = sessToken.Replace("; Domain=.betfair.com; Path=/; Secure", "")

            Without this, all subsequent API calls will have an invalid ssoid (specifically with the word "Secure" stuck on the end of it) and won't work.

            Comment


            • #7
              cheers guys

              Comment


              • #8
                I had the same problem but solved it
                I was using the code provided in all the examples but was getting the error INVALID_SESSION_INFORMATION
                This simple change to extracting the ssoid fixes it:

                sessToken = ssoid.Replace("ssoid=", "") 'Dump front string
                sessToken = Mid(sessToken, 1, 44)

                It seems that either Betfair has modified the login response, or the latest .net version works slightly differently

                Comment

                Working...
                X