manofcheese
New Member
- Joined
- Jan 5, 2019
- Messages
- 8
I am trying to access an api from a site called keepa.com. I create a Msxml2.ServerXMLHTTP object and am able to get a response but the text is just a jumbled mess. For example the some of the response looks like this :
I have tried to use MSXML2.XMLHTTP instead but I get an error saying that access is denied.
Below is my current code.
Does anyone know what I need to do to get the response back in readable text?
?x^??^H?\KIv3K ,+)?j2?%b6??;????u?iL\i??4???k}?:?I???]??????k??????1?????%}?WC????u??=S???Ï?????/f*??Zn=?+h?????i?r?^?L`????kJ??`lim&2?MF??V
I have tried to use MSXML2.XMLHTTP instead but I get an error saying that access is denied.
Below is my current code.
Code:
Function getProductObject(apiKey As String, asins As String) As Object
Dim url As String
url = "http://api.keepa.com/product?key=" & apiKey & "&domain=1&asin=B06XRT2B3P,B06XKLHSWJ&history=1&stats=1"
Dim hReq As Object
Set hReq = CreateObject("Msxml2.ServerXMLHTTP")
With hReq
.Open "GET", url, False
.Send
End With
Debug.Print hReq.ResponseText
Dim response As String
response = "{""data"":" & hReq.ResponseText & "}"
Set getProductObject = JsonConverter.ParseJson(response)
End Function
Does anyone know what I need to do to get the response back in readable text?