TsgcWSAPIClient_MCP › Events › OnMCPAuthorizationURL
Fires with the URL the user must open to authorize the client.
property OnMCPAuthorizationURL: TsgcAI_MCP_Client_OnAuthorizationURLEvent;
// TsgcAI_MCP_Client_OnAuthorizationURLEvent = procedure(Sender: TObject; const aURL: string; var Handled: Boolean) of object
—
Raised by the automatic authorization of MCPOptions.Authorization after the client starts the local listener on RedirectURL. Set Handled to True when your application opens the URL itself; otherwise the default browser is opened.
Available only when the library is compiled with OAuth2 support (define SGC_OAUTH). See Authorization.
procedure TMainForm.MCPAuthorizationURL(Sender: TObject; const aURL: string;
var Handled: Boolean);
begin
WebBrowser1.Navigate(aURL);
Handled := True;
end;