Getting started with TMS FNC Cloud Box
Prerequisites
- TMS FNC Core installed and the runtime package added to the project.
- TMS FNC Cloud Pack installed.
- A Box developer app with a client ID, client secret, and a registered redirect URI.
Add the component
- Drop
TTMSFNCCloudBoxonto a form (or create it in code). - Set the Box app credentials on
Authentication(client ID, secret, redirect URI). - Call
Connectto authenticate, then call Box operations fromOnConnected.
Minimal example
Set the credentials, connect, and request the account info once connected:
procedure TForm1.FormCreate(Sender: TObject);
begin
// Credentials from your Box developer app (https://developer.box.com/).
TMSFNCCloudBox1.Authentication.ClientID := 'your-box-client-id';
TMSFNCCloudBox1.Authentication.Secret := 'your-box-client-secret';
// Must match a redirect URI registered on the Box app.
TMSFNCCloudBox1.Authentication.CallBackURL := 'http://127.0.0.1:8000';
TMSFNCCloudBox1.OnConnected := BoxConnected;
// Opens the Box consent page in the browser and exchanges the code for tokens.
TMSFNCCloudBox1.Connect;
end;
procedure TForm1.BoxConnected(Sender: TObject);
begin
// Tokens are now available on Authentication; safe to call Box operations.
TMSFNCCloudBox1.GetAccountInfo;
end;
Next steps
- Authentication — credentials, the OAuth flow, and reusing saved tokens
- Files and folders — listing, metadata, and the async result model
- Uploading and downloading — transferring file content
- Managing and sharing — create, move, delete, search, share, account info
- API reference — full class reference