79110803

Date: 2024-10-21 15:54:15
Score: 1
Natty:
Report link
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 
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Eli