Hi guys,
I have just started experimenting with the new API using Excel macros. I have managed to log in and out (after a few issues with the SSL certificate) and can navigate to and browse the markets that I want. So I know that my general approach is working.
My issue is that using the code below, I get a status of 404 when I try to make a KeepAlive call. This seems really odd to me as the format of the call seems to follow that of my other calls
Is the KeepAlive working OK, or can somebody show me where my code is wrong
Many thanks
I have just started experimenting with the new API using Excel macros. I have managed to log in and out (after a few issues with the SSL certificate) and can navigate to and browse the markets that I want. So I know that my general approach is working.
My issue is that using the code below, I get a status of 404 when I try to make a KeepAlive call. This seems really odd to me as the format of the call seems to follow that of my other calls
Is the KeepAlive working OK, or can somebody show me where my code is wrong
Many thanks
Code:
Sub sendKeepAlive()
Dim xhr As Object
Dim url As String
Dim appkey As String
Dim sessionkey As String
Dim rsp As Object
' The API-NG KeepAlaive URL
url = "https://identitysso.betfair.com/api/KeepAlive/"
' Retreive the current application key and session token strings
appkey = getappkey()
sessionkey = getsession()
' create a HTTP request object
Set xhr = CreateObject("MSXML2.XMLHTTP")
xhr.Open "POST", url, False
' set all the headers
xhr.setRequestHeader "Content-Type", "application/json"
xhr.setRequestHeader "Accept", "application/json"
xhr.setRequestHeader "X-Application", appkey
xhr.setRequestHeader "X-Authentication", sessionkey
' send the request
xhr.send
rsp = xhr.responseText
End Sub


Comment