Announcement

Collapse
No announcement yet.

Betfair API Login - TLS 1.2 - from 19th February 2019

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Mike2609 View Post
    What do I have to change in VB.NET. I can no longer log in
    Go to Project->Properties... and check what version of .NET Framework you are targeting.
    I think 4.6.1 is the latest.

    Comment


    • #17
      Mine is 4.5

      Comment


      • #18
        Sorted it
        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

        Comment


        • #19
          Help please! Visual Basic (VBA)

          I am not a programmer! But I've scambled together thousands of lines that work automatically on the Betfair API (or have until now). Does anyone know what I need to change here??

          ----

          Function SendLoginRequest(url, appkey, username, password) As String
          On Error GoTo ErrorHandler:

          Dim xhr: Set xhr = CreateObject("WinHttp.WinHttpRequest.5.1")
          Dim myToken As String

          With xhr
          .Open "POST", url & "/", False
          .setRequestHeader "X-Application", appkey
          .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
          .setRequestHeader "Accept", "application/json"

          End With


          xhr.Send "username=" & username & "&password=" & password
          SendLoginRequest = xhr.responseText

          If xhr.Status <> 200 Then
          Err.Raise vbObjectError + 1000, "Util.SendRequest", "The call to API-NG was unsuccessful. Status code: " & xhr.Status & " " & xhr.statusText & ". Response was: " & xhr.responseText
          End If


          Set xhr = Nothing

          On Error GoTo 0
          Exit Function

          ErrorHandler:
          HandleError "SendRequest"
          'Resume Next


          End Function

          Comment


          • #20
            Hi. What about Visual Basic? I use VBA macros in Excel to run my login.

            I can no longer login using my script

            (The resources - as usual - show Python and others - any info for VB?)

            Please help

            Comment

            Working...
            X