I’m trying to get Dropbox token from call-back parameters but the parameters are always empty.
Here is my code:
sURL :=
https://www.dropbox.com/oauth2/authorize' +
'?response_type=token' +
'&client_id=' + MyAppID +
'&redirect_uri=http://127.0.0.1:8888/';
ShellExecute(0, 'OPEN', PChar(sURL), '', '', SW_SHOWNORMAL);
Next I have IdHTTPServer set to listen http://127.0.0.1:8888/ address.
On executing the browser with Dropbox log-in popup. When I made log-in the redirection is made and the “IdHTTPServerCommandGet” events is called. So far so good.
In the browser I can see the next URL: http://127.0.0.1:8888/#access_token=123&token_type=bearer&uid=1234&account_id=dbid%1234
But in “IdHTTPServerCommandGet” events the parameters are always empty:
ARequestInfo.UnparsedParams; // Empty
ARequestInfo. QueryParams; // Empty
if ARequestInfo.Params.Count > 0 then // Empty
sToken := ARequestInfo.Params[0];
And here is my question. How can I get the whole URL with parameters from IdHTTPServer?