Dim tokenHTTP As Object
Set tokenHTTP = CreateObject("MSXML2.ServerXMLHTTP")
Dim tokenJSON As String
Dim tokenURL As String
Dim accessToken As String
tokenURL = "https://googlesample.api.google/okta"
tokenHTTP.Open "POST", tokenURL, True
tokenHTTP.setRequestHeader "Content-type", "application/json"
tokenHTTP.setRequestHeader "username", "myusername"
tokenHTTP.setRequestHeader "password", "mypassword"
tokenHTTP.send (tokenURL)
tokenJSON = tokenHTTP.responseText