When calling a server I can get a response$ from a server with:-
http = CreateHTTPConnection ( )
SetHTTPHost( http, "Awebsite.com", 1 ,"USER" , "PASSWORD" )
SendHTTPRequestASync( http, "/the page its on" )
while GetHTTPResponseReady(http) = 0
Print( "Connecting..." )
Sync()
endwhile
response$ = GetHTTPResponse(http)
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
do
print(ScreenFPS())
print(response$)
sync
loop
Which is fine, but the API I am using then needs
each call to it to be AUTHENTICATED as in the API help below:-
Authentication is fulfilled by sending the following HTTP-titles:
Key - API-key, example: FAF816D16FFDFBD1D46EEF5D5B10D8A2
Sign - digital signature, POST-parameters (?param0=val0 & ...& nonce=1) signed by secret key through HMAC-SHA512
Parameter nonce (1 minimum to 2147483646 maximum) in succeeding request should exceed that in the previous one.
Question : is it possible to sign in to the non PUBLIC area of a sites API with AppGameKit considering the HMAC-Sha512 part of the advice?
I have tried putting my KEY and SECRET in the line:- SetHTTPHost( http, "website.com", 1 ,"KEY" , "SECRET" ) (also sha512 versions of them)
but the I cant confirm EXACTLY how I should word the SendHTTPRequestASync( http, "/the page its on" ) and its POST info command line to get a success=1 return nor where to correctly place the variable nonce so I can then increment it each call....so to no avail
Anybody help trying to log in to a secure area of an API from AppGameKit? OR is it that I need to use HMAC-Sha512 , or encode to it...or is it how the call line is constructed???
Thx