Tuesday 29 November 2016

Betfair API-NG - login when your session token has expired.

When I start the application it is smart enough  to automatically login by itself when the persisted session token has expired. The default radio buttons selections are used together with the persisted application keys to do  certificate login. The "Betfair Authentication" I never use it is only for backup just in case my digital certificate  fails for any reason.  Do you know that session token works for both Live and Delayed Keys. So you can switch to live or delayed without longing in. You will never know if you don't have a Live Key.



The old and new way my app login to Betfair API-NG.

First version I have to hide my app key and username and password and login every time I start my   application.

Latest version app keys, username and password plus session token are persisted in my.settings(secured), so when I start my app again they are already available without manual input on the login in part of the screen. First is to call Keep Alive and if successful (means your persisted session token is still valid) and your app doesn't have to login. The session token last for hours so in course of the day my app login only a couples of times. Saves time and you are doing Betfair a favor to lessen their server workload.