I'm trying to submit a google form with MSXML2.XMLHTTP and keep getting an access denied error. I can submit with cURL but I want the status code.
VBA Code:
const url$ = "https://docs.google.com/forms/d/e/bunchofnumbersAndCharacters/formResponse"
const postData$ = "entry.227122838=Loc&entry.1815706984=Cit&entry.55364550=Cou&entry.1590825643=2604:3d09:927e:1100:7dd9:e011:fa9e:a4b4&entry.1917934143=Database&entry.1144002976=2024-06-18 13:10:56"
'Shell "curl --fail -X POST -d """ & postData & """ """ & url & Chr(34)
With CreateObject("MSXML2.XMLHTTP")
.Open "POST", url, False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.setRequestHeader "Content-Length", Len(postData)
.send postData
if .Status = 200 then exit sub
End With