Topic: Capital One Bank OFX download from server.

So i looked up the info for this particular bank:

ORG: Hibernia
BANKID: 1001

So I'm trying to get the darn request to give me a response besides:

OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX>
<SIGNONMSGSRSV1><SONRS>
<STATUS>
<CODE>15500
<SEVERITY>ERROR
<MESSAGE>The user cannot signon because he or she entered an invalid user ID or password.
</STATUS>
<DTSERVER>20140924012235.515[0:GMT]
<LANGUAGE>ENG
<FI>
<ORG>Hibernia
<FID>1001
</FI>
</SONRS>
</SIGNONMSGSRSV1>
<SIGNUPMSGSRSV1>
<ACCTINFOTRNRS>
<TRNUID>160504a7-a435-4746-8f69-6273d09c4071
<STATUS>
<CODE>15500
<SEVERITY>ERROR
<MESSAGE>The user cannot signon because he or she entered an invalid user ID or password.
</STATUS>

<CLTCOOKIE>1

</ACCTINFOTRNRS>
</SIGNUPMSGSRSV1>
</OFX>

This is the XML I'm sending and it's mimicing the exact XML used to request data in Quicken.
I've tried account list and account activity as well:

    Public Function Download(ByVal ofxUrl As String) As String
        Dim byteBuffer() As Byte = Encoding.ASCII.GetBytes(DataBuffer.ToString)
        Dim responseReader As StreamReader


        objReq = WebRequest.Create(ofxUrl)
        objReq.Method = "POST"
        objReq.ContentType = "application/x-ofx"
        objReq.Accept = "*/*, application/x-ofx"
        objReq.ContentLength = byteBuffer.Length
        System.Net.ServicePointManager.Expect100Continue = False
        ReqStream = objReq.GetRequestStream
        ReqStream.Write(byteBuffer, 0, byteBuffer.Length)
        ReqStream.Close()
        objResponse = objReq.GetResponse

        ResponseStream = objReq.GetResponse.GetResponseStream
        responseReader = New StreamReader(ResponseStream)
        _ResponseString = responseReader.ReadToEnd
        Select Case _RequestType
            Case RequestType.AccountActivity
                ParseBankItems()
            Case RequestType.AccountList
                ParseAccountList()
        End Select

        Return _ResponseString


    End Function
    Public Sub New(ByVal ofx_RequestType As RequestType, ByVal userName As String, ByVal password As String, ByVal AccountID As String, ByVal BankID As String, ByVal org As String, ByVal FID As String)

        _UserName = userName
        _Password = password
        _AccountID = AccountID
        _BankID = BankID
        _ORG = org
        _FID = FID
        CurrGuid = Guid.NewGuid.ToString
        Dim clientDate As String
        clientDate = Format(DateTime.Now, "yyyyMMddHHmmss")



        DataBuffer.AppendFormat("OFXHEADER:100{0}", vbCrLf)
        DataBuffer.AppendFormat("DATA:OFXSGML{0}", vbCrLf)
        DataBuffer.AppendFormat("VERSION:103{0}", vbCrLf)
        DataBuffer.AppendFormat("SECURITY:NONE{0}", vbCrLf)
        DataBuffer.AppendFormat("ENCODING:USASCII{0}", vbCrLf)
        DataBuffer.AppendFormat("CHARSET:1252{0}", vbCrLf)
        DataBuffer.AppendFormat("COMPRESSION:NONE{0}", vbCrLf)
        DataBuffer.AppendFormat("OLDFILEUID:NONE{0}", vbCrLf)
        DataBuffer.AppendFormat("NEWFILEUID:NONE{0}", vbCrLf)
        DataBuffer.Append(vbCrLf)
        DataBuffer.AppendFormat("<OFX>{0}", vbCrLf)
        DataBuffer.AppendFormat("<SIGNONMSGSRQV1>{0}", vbCrLf)
        DataBuffer.AppendFormat("<SONRQ>{0}", vbCrLf)
        DataBuffer.AppendFormat("<DTCLIENT>" & clientDate & "{0}", vbCrLf)
        DataBuffer.AppendFormat("<USERID>" & userName & "{0}", vbCrLf)
        DataBuffer.AppendFormat("<USERPASS>" & password & "<GENUSERKEY>N{0}", vbCrLf)
        DataBuffer.AppendFormat("<LANGUAGE>ENG{0}", vbCrLf)
        DataBuffer.AppendFormat("<FI>{0}", vbCrLf)
        DataBuffer.AppendFormat("<ORG>" & org & "{0}", vbCrLf)
        DataBuffer.AppendFormat("<FID>" & FID & "{0}", vbCrLf)
        DataBuffer.AppendFormat("</FI>{0}", vbCrLf)
        DataBuffer.AppendFormat("<APPID>QWIN{0}", vbCrLf)
        DataBuffer.AppendFormat("<APPVER>2200{0}", vbCrLf)
        ' DataBuffer.AppendFormat("<CLIENTUID>1aecbfa682450b015b0bf7c02c934f57{0}", vbCrLf)
        DataBuffer.AppendFormat("</SONRQ>{0}", vbCrLf)
        DataBuffer.AppendFormat("</SIGNONMSGSRQV1>{0}", vbCrLf)
        _RequestType = ofx_RequestType
        Select Case ofx_RequestType
            Case RequestType.AccountList
                DataBuffer.AppendFormat("<SIGNUPMSGSRQV1>{0}", vbCrLf)
                DataBuffer.AppendFormat("<ACCTINFOTRNRQ>{0}", vbCrLf)
                DataBuffer.AppendFormat("<TRNUID>" & CurrGuid & "{0}", vbCrLf)
                'DataBuffer.AppendLine("<CLTCOOKIE>1")
                DataBuffer.AppendFormat("<ACCTINFORQ>{0}", vbCrLf)
                DataBuffer.AppendFormat("<DTACCTUP>19900101{0}", vbCrLf)
                DataBuffer.AppendFormat("</ACCTINFORQ>{0}", vbCrLf)
                DataBuffer.AppendFormat("</ACCTINFOTRNRQ>{0}", vbCrLf)
                DataBuffer.AppendFormat("</SIGNUPMSGSRQV1>{0}", vbCrLf)
                DataBuffer.AppendFormat("</OFX>{0}", vbCrLf)
            Case RequestType.AccountActivity
                DataBuffer.Append("<BANKMSGSRQV1>")
                DataBuffer.Append("<STMTTRNRQ>")
                DataBuffer.Append("<TRNUID>" & CurrGuid)
                DataBuffer.Append("<STMTRQ>")
                DataBuffer.Append("<BANKACCTFROM>")
                DataBuffer.Append("<BANKID>" & BankID)
                DataBuffer.Append("<ACCTID>" & AccountID)
                DataBuffer.Append("<ACCTTYPE>")
                DataBuffer.Append("</BANKACCTFROM>")
                DataBuffer.Append("<INCTRAN>")
                DataBuffer.Append("<INCLUDE>Y")
                DataBuffer.Append("</INCTRAN>")
                DataBuffer.Append("</STMTRQ>")
                DataBuffer.Append("</STMTTRNRQ>")
                DataBuffer.Append("</BANKMSGSRQV1>")
                DataBuffer.Append("</OFX>")

                'later
        End Select
    End Sub

Those are the two main functions, building the XML and sending the request.
Here is the code used to call it:

Dim ofx As New OFXDownload(OFXDownload.RequestType.AccountList, "user", "pass", "acctid", "065002030", "Hibernia", "1001")
        ofx.Download("https://onlinebanking.capitalone.com/ofx/process.ofx")

I'm lost as to why no matter the version I change, switching between types and other things it always returned the ERROR response above.  Also, commenting/uncommenting the CLTCOOKIE and CLIENTUID has no effect on the response.

Can anyone help me with this??

Thanks,

Justin

Re: Capital One Bank OFX download from server.

So I've officially tried Quicken, AceMoney, GNUCash and my own code and all are getting the same ERROR Username/Password response.

CapitalOne insists that I should call Quicken...

Think I'd be better off close my accounts and moving to another bank than trying to solve this headache.