Getting started with TMS FNC Cloud DropBox
Prerequisites
- TMS FNC Core installed and the runtime package added to the project.
- TMS FNC Cloud Pack installed.
- A Dropbox app with an app key, app secret, and a registered redirect URI.
Use the TMS cloud service key guide to locate the provider-specific registration page and credential fields: Cloud service API keys.
Add the component
- Drop
TTMSFNCCloudDropBoxonto a form (or create it in code). - Set the Dropbox app credentials on
Authentication(app key, secret, redirect URI). - Call
Connectto authenticate, then call Dropbox operations fromOnConnected.
Minimal example
Set the credentials, connect, and request the account info once connected:
procedure TForm1.FormCreate(Sender: TObject);
begin
// Credentials from your Dropbox app (https://www.dropbox.com/developers/apps).
TMSFNCCloudDropBox1.Authentication.ClientID := 'your-dropbox-app-key';
TMSFNCCloudDropBox1.Authentication.Secret := 'your-dropbox-app-secret';
// Must match a redirect URI registered on the Dropbox app.
TMSFNCCloudDropBox1.Authentication.CallBackURL := 'http://127.0.0.1:8000';
TMSFNCCloudDropBox1.OnConnected := DropBoxConnected;
// Opens the Dropbox consent page in the browser and exchanges the code for tokens.
TMSFNCCloudDropBox1.Connect;
end;
procedure TForm1.DropBoxConnected(Sender: TObject);
begin
// Tokens (including a refresh token) are now available on Authentication.
TMSFNCCloudDropBox1.GetAccountInfo;
end;
Next steps
Service registration and terms - provider registration links, terms of use, and warranty notes
Authentication — credentials, the OAuth flow, and persisting tokens
Folder and file operations — listing, creating, moving, renaming and deleting
Search and download — searching and downloading a folder as a ZIP
Uploading — transferring file content, including resumable uploads
API reference — full class reference