First thing I noticed about your code is that the password was missing an "s". Then when you have a strange long number in the url is because there is some kind of authentication needed to generate the url "3415c458-40bf-4e63-903a-37302a88bd83"
When this happens you need to locate the signin url and then use a "POST" method to validate the data. Once you have done that then you can send the regular "GET" request and the data will show.
Sub downloadingpositions()
Const strLOGING_URL As String = "https://registration.ft.com/registration/barrier/login?username=ft.testing.acct@gmail.com&password=fttestpassword"
Const strPORTFOLIO_URL As String = "http://portfolio.ft.com/PortfolioAPI/ExportToCSV?containerID=3415c458-40bf-4e63-903a-37302a88bd83&type=Holdings&customName=suggested__0YourPortfolio&duration=15&startDate=undefined&endDate=undefined"
Const strINCORRECT_CREDENTIALS As String = "Your email address and password do not match our records"
Const strFILE_NAME As String = "c:\temp\testing.csv"
Dim WinHttpReq As Object
Dim oStream As Object
Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
' Post to the url to set the credentials
WinHttpReq.Open "POST", strLOGING_URL, 0
WinHttpReq.Send
' Make sure authetication went through
If Not UCase$(WinHttpReq.ResponseText) Like "*" & UCase$(strINCORRECT_CREDENTIALS) & "*" Then
' Get the information.
WinHttpReq.Open "GET", strPORTFOLIO_URL, 0
WinHttpReq.Send
' If we have succedeed then write the response to the file.
If WinHttpReq.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.ResponseBody
oStream.SaveToFile strFILE_NAME, 2 ' 1 = no overwrite, 2 = overwrite
oStream.Close
End If
Else
MsgBox strINCORRECT_CREDENTIALS, vbOKOnly + vbCritical, "Error"
End If
End Sub
I hope this helps :)