Is it possible to access a WebService using oAuth 2.0 from fivewin using CreateObject( "MSXML2.XmlHttp" ), I have been connecting with Carbonite using what seems to be a similar technique. I am attempting to access On-Site.com using their API's. There is some code to generate a Key and I believe this key is good for quite a while, whereas the Carbonite key needed to be generated every hour.
Sample code:
oHttp := CreateObject( "MSXML2.XmlHttp" )
hLogin["email" ] := "bhopp@matrixcomputer.com"
hLogin["password"] := "MyPassword"
cLogin := hb_JsonEncode( hLogin )
oHttp:Open( "POST","https:" + "/" + "/" + "api.carbonite.com:443/api/auth/login",.f. )
oHttp:SetRequestHeader( "Content-Type", "text/json" )
oHttp:Send( cLogin )
If oHttp:status == 200
cResponse := oHttp:ResponseText()
Logit( Mcs_AppPath() + "Request.txt",cResponse )
Else
MsgStop( "Status:" + oHttp:statusText,"Request Failed" )
Endif