Providing authentication info via msxml2.ServerXMLHTTP

Try

http.Open "GET", vurl, False, "yourusername", "yourpassword"

I don’t know if this works on justgiving, but it does with the Bing API

Also, this question may be relevant
XmlHttp Request Basic Authentication Issue

Edit – using Response.ContentType and Msxml2.ServerXMLHTTP.6.0

vurl = "https://api.justgiving.com/API_KEY/v1/account"
Set http = Server.CreateObject("msxml2.ServerXMLHTTP.6.0")
http.Open "GET", vurl, False, "username", "pwd"
http.setTimeouts 5000, 5000, 10000, 10000 'ms - resolve, connect, send, receive'
http.setRequestHeader "Authorization", "Basic MY_AUTH_STRING"
http.Send

Response.ContentType = "application/xml"    

Set items = http.responseXML.getElementsByTagName("account")

etc

Leave a Comment