Need some slight guidance, as this is kind off doing my head in...
I am an older programmer, still using VB6, but ultimately ALL my software is VB6 and runs perfectly and I usually don't have an issue connecting to modern day systems.
However, with Betfair I am encountering an issue, that is proving hard to debug.
I have a login session using a MSXML2.XMLHTTP object to connect to https://identitysso.betfair.com.au/api/login
This section works perfectly ALL the time, I receive a JSON response {'token";'[SESSION KEY]","product":"[PRODUCT KEY]",'status";"SUCCESS",'error":""}, so I get the session key..
I then do a listeventscall to the URL https://api.betfair.com/json-rpc/ with a request string of "{""jsonrpc"": ""2.0"", ""method"": ""SportsAPING/v1.0/listEventTypes"", ""params"": {""filter"":{}}, ""id"": 1}"
What is happening is:
When I first do the login I get a JSON list of events as expected, and whilst I have that session open, I can continually use the List Events Call and I receive that data, remembering I am testing and debugging development.
However, as soon as I exit my software, which releases my session variable, and I reload my test program and use the login process again, which gets another session key perfectly, then I try the same function to call the ListEventscall I receive a 'INVALID_SESSION_INFORMATION", and this doesn't clear for a while, I can turn computer off etc... basically anything, and the same Invalid Session Information appears (Login process appears fine though).
Is this because the initial session key is still in the system, and basically locking any other requests until the original session times out??
And what's the best practice process? Logout no matter what after each session??, although I haven't successfully achieve this one yet.... which is painful as if my code doesn't work I know I can't get back in to run another test for a while.
And finally is there a way to 'kill' sessions linked to a login user and product?
Regards
I am an older programmer, still using VB6, but ultimately ALL my software is VB6 and runs perfectly and I usually don't have an issue connecting to modern day systems.
However, with Betfair I am encountering an issue, that is proving hard to debug.
I have a login session using a MSXML2.XMLHTTP object to connect to https://identitysso.betfair.com.au/api/login
This section works perfectly ALL the time, I receive a JSON response {'token";'[SESSION KEY]","product":"[PRODUCT KEY]",'status";"SUCCESS",'error":""}, so I get the session key..
I then do a listeventscall to the URL https://api.betfair.com/json-rpc/ with a request string of "{""jsonrpc"": ""2.0"", ""method"": ""SportsAPING/v1.0/listEventTypes"", ""params"": {""filter"":{}}, ""id"": 1}"
What is happening is:
When I first do the login I get a JSON list of events as expected, and whilst I have that session open, I can continually use the List Events Call and I receive that data, remembering I am testing and debugging development.
However, as soon as I exit my software, which releases my session variable, and I reload my test program and use the login process again, which gets another session key perfectly, then I try the same function to call the ListEventscall I receive a 'INVALID_SESSION_INFORMATION", and this doesn't clear for a while, I can turn computer off etc... basically anything, and the same Invalid Session Information appears (Login process appears fine though).
Is this because the initial session key is still in the system, and basically locking any other requests until the original session times out??
And what's the best practice process? Logout no matter what after each session??, although I haven't successfully achieve this one yet.... which is painful as if my code doesn't work I know I can't get back in to run another test for a while.
And finally is there a way to 'kill' sessions linked to a login user and product?
Regards


Comment