Invalid_session_information

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

    #1

    Invalid_session_information

    Hi guys,

    I studied the code from the example client app which works well and ventured out to try my own app.

    I tried to get a list of events and all I got back was INVALID_SESSION_INFORMATION

    Searching for the answer to that problem I found that it is necessary to use the Keep Alive function so I implemented that function and then I get Error: NO_SESSION

    Which is odd because clearly I have a session value,
    I then compared my secession value with that which is returned for the working example code..

    From my code it is
    cHLKxUhBLs06wv8gxXwD4ht%2FyhR2skRKYL11vNrzTN0%3D
    and the working example code is
    fbI+BEAV0I6m1IICwYzMcww/1IjCm6A9kqOBv/4KQh0=

    Other than the fact that the session variables are obviously different why would I be getting a NO_SESSION response? Or even an Invalid session for that matter.

    Anyone got any ideas?

    Kind Regards
    OzPunter
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #2
    The session id is not a fixed value. It is set up every time you log in to Betfair via your app.

    To ensure your session id is valid, you must log in, store the session id and use the session id for all calls. If the session is invalidated for any reason, then you need to log in again to receive a new session id.

    So, the error message that you are receiving, indicates that you are using an old session id, rather than the session id that was issued when you logged in.

    As that session probably no longer exists, you can't keep it alive.

    Comment

    • OzPunter
      Junior Member
      • Apr 2009
      • 161

      #3
      Originally posted by betdynamics View Post
      The session id is not a fixed value. It is set up every time you log in to Betfair via your app.

      To ensure your session id is valid, you must log in, store the session id and use the session id for all calls. If the session is invalidated for any reason, then you need to log in again to receive a new session id.

      So, the error message that you are receiving, indicates that you are using an old session id, rather than the session id that was issued when you logged in.

      As that session probably no longer exists, you can't keep it alive.
      Dear betdynamics,

      Thank you for your input, but I don't think this is the problem. After logging in I immediately attempt a list events or even to do a keep alive and recieve the session errors.

      The time between a sucessfull log in and the request would be seconds so I doubt if the session should have been invalidated in that time.

      It is possible that the code that I'm using to decode the PostData from the Twebbrowser is not interpreting the session data correctly and my line of thinking is that the PostData decode is in the wrong character format, UTF-8 or something other than what is required.

      That is what I am experimenting with at the moment. The decoding used in the example client code uses an Indy TIdURI class which I am having difficulty implementing in my code at the moment so I'm searching for a some sort of alternative.

      The example client code works well so that is a blessing.

      Thanks for your assistance

      Kind Regards
      OzPunter

      Comment

      Working...
      X