I am trying to communicate to a WebAPI via MSXML, but whenever I try to request a response, my error-handle is called and it shows "Statuscode 429: Too many requests". When I paste the URL which I call into my browser, I get the correct and expected response immediately. I do not understand where the problem is lying. Is my guess correct, that MSXML.HTTP-requests are send from a centralized Microsoft server? This would mean, that everybody, who is using this function to call the same API as I did, is stacking requests, leading to the API blocking the Microsoft-Sever-IP for too many requests. If so, can I somehow define the IP of a MSXML.HTTP-request?
Code used for the API-Call:
Dim urlAPISteam As String
Dim parametersSteam As String
Dim url As String
Dim clientID As String
'http://steamcommunity.com/inventory/<PROFILEID>/730/2?l=english&count=##
'API Request Steam
clientID = 76561197960361544
urlAPISteam = "https://steamcommunity.com/inventory/"
parametersSteam = clientID & "/730/2?l=english&count=1"
url = urlAPISteam & parametersSteam
With CreateObject("MSXML2.XMLHTTP.6.0")
.Open "Get", url, False
.send
'Error Handle
If .Status <> 200 Then
MsgBox "Statuscode: " & .Status & " Message: " & .responseText
Exit Sub
End If
Dim response As Collection
Set response = JsonConverter.ParseJson(.responseText)
End With
I found the proxy function, but is this the only way to go? That might kill my project.
I already checked:
- I got an APIkey but it is not needed for this Request (Same issue with the key applied)