2
votes

I have this script to automatically fetch Google Analytics results, it has worked fine for over a year. All of the sudden it stopped working.

I'm getting error 80070057: parameter is incorrect

This is the code. And yes, I'm using a proxy.

The error happens at the first SetRequestHeader

Dim WinHttpReq As WinHttp.WinHttpRequest
    ' Create an instance of the WinHTTPRequest ActiveX object.
    Set WinHttpReq = New WinHttpRequest

    ' Assemble an HTTP Request.
    WinHttpReq.Open "GET", url, False
    WinHttpReq.SetProxy HTTPREQUEST_PROXYSETTING_PROXY, "http://webproxy.vum.be:8080"
    WinHttpReq.SetRequestHeader "Authorization", "GoogleLogin Auth=" & auth
    WinHttpReq.SetRequestHeader "GData-Version", 2

' Send the HTTP Request.
    WinHttpReq.Send

    ' Put status and content type into status text box.
    strStatus = WinHttpReq.STATUS & " - " & WinHttpReq.StatusText
    'Debug.Print "Status: " & strStatus

    If Body = True Then
        get_url_google = WinHttpReq.ResponseText
    Else
        get_url_google = strStatus
    End If
1

1 Answers

1
votes

It was Google's fault. The "auth" variable was misformed, during the authentication procedure google was asking for a captcha.