TsgcWSAPIClient_MCP › Events › OnMCPAuthorizationURL

OnMCPAuthorizationURL Event

Fires with the URL the user must open to authorize the client.

Syntax

property OnMCPAuthorizationURL: TsgcAI_MCP_Client_OnAuthorizationURLEvent;
// TsgcAI_MCP_Client_OnAuthorizationURLEvent = procedure(Sender: TObject; const aURL: string; var Handled: Boolean) of object

Default Value

—

Remarks

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.

Example

procedure TMainForm.MCPAuthorizationURL(Sender: TObject; const aURL: string;
  var Handled: Boolean);
begin
  WebBrowser1.Navigate(aURL);
  Handled := True;
end;

Back to Events