Dim WHTTP As Object
Set WHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
mainUrl = "https://googlesample.api.google/okta"
myuser = "myluckyuser"
mypass = "myluckypassword"
strAutheticate = "username=" & myuser & "& password=" & mypass
WHTTP.Open "POST", mainUrl, False
'WHTTP.setRequestHeader "apikey", "[Token]"
WHTTP.setRequestHeader "Content-Type", "application/json"
WHTTP.send strAutheticate
Dim response As String
??? How to I receive the token here ????
I am trying to invoke the API using REST and get the token.
so should return "access_token" : "blah134hao9u098-098-09";
whttp.responseText? you need to write a wait-loop though.