Hi,
I cannot use a TWebRestClient to get a
token from the HMRC site because of CORS so I have to find another way
of doing this. The following opens the page correctly:
URL:=HMRCAuthorizationEndpoint+'?response_type=code&client_id='+SA_Client_ID+
'&scope=hello%20read:vat%20write:vat&redirect_uri=http://localhost:8000/Bridge/Bridge.html';
asm
window.open(URL, 'oauth', 'width=800, height=600, location=no, toolbar=no, menubar=no,
'&scope=hello%20read:vat%20write:vat&redirect_uri=http://localhost:8000/Bridge/Bridge.html';
asm
window.open(URL, 'oauth', 'width=800, height=600, location=no, toolbar=no, menubar=no,
titlebar=no. location=no');
end;
end;
When the user has authorised our usage HMRC will do GET http://localhost:8000/Bridge/Bridge.html?code=hujuhkjhksdhkhs
How can I get this code?
Thanks,