Session Token

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spacebiscuit
    Junior Member
    • Feb 2015
    • 5

    #1

    Session Token

    Hi,

    How can I implement my script without the need to update my session token manually when it expires. I have already created and uploaded a self-sign cert.

    Thanks,

    David.
  • Merlin
    Junior Member
    • Jan 2009
    • 56

    #2
    Hi spacebiscuit,
    you should probably use the keep alive call.
    cheers
    Merlin

    Comment

    • r4ge
      Junior Member
      • Nov 2014
      • 24

      #3
      This doesn't keep the session alive at all.

      From what I have seen, this is just a check to see if the session token is OK. I have been calling this all day, but still got the session expired message on another call.

      Comment

      • Merlin
        Junior Member
        • Jan 2009
        • 56

        #4
        I'm only going by what's in the documentation, where it clearly states that keepAlive extends the session. I only stay logged in during UK horseracing hours, so I've never personally had a session time out - I will test this immediately, but obviously it's going to take a day to get any result. One thing that occurred to me was that the session may be extended with a different session token, as it was in the old v6 API.

        Merlin

        Comment

        • Lopiner
          Junior Member
          • Feb 2009
          • 117

          #5
          I think in the new API the only way is to trap the error and login again.
          fooledbyabet.com

          Comment

          • Merlin
            Junior Member
            • Jan 2009
            • 56

            #6
            Hi r4ge,

            I've just run 'keepAlive' on the same session for 24 hours at 20 minute intervals - the session was still alive at the end and returning the same session token that was returned at login - How long were you logged in for before you were getting the 'INVALID_SESSION_INFORMATION' error?

            Merlin

            Comment

            • r4ge
              Junior Member
              • Nov 2014
              • 24

              #7
              Timed out at exactly 12 hours.

              I had to put a 10 hour timer in my code and perform the login method again.

              Comment

              Working...
              X