Getting started with TMS FNC Cloud Google Drive
Prerequisites
- TMS FNC Core installed and the runtime package added to the project.
- TMS FNC Cloud Pack installed.
- A Google Cloud project with the Drive API enabled and an OAuth client ID, secret, and authorized redirect URI.
Add the component
- Drop
TTMSFNCCloudGoogleDriveonto a form (or create it in code). - Set the Google API credentials on
Authentication(client ID, secret, redirect URI). - Call
Connectto authenticate, then call Drive operations fromOnConnected.
Minimal example
Set the credentials, connect, and request the account info once connected:
procedure TForm1.FormCreate(Sender: TObject);
begin
// OAuth client from a Google Cloud project with the Drive API enabled.
TMSFNCCloudGoogleDrive1.Authentication.ClientID := 'your-google-client-id';
TMSFNCCloudGoogleDrive1.Authentication.Secret := 'your-google-client-secret';
// Must match an authorized redirect URI on the OAuth client.
TMSFNCCloudGoogleDrive1.Authentication.CallBackURL := 'http://127.0.0.1:8000';
TMSFNCCloudGoogleDrive1.OnConnected := DriveConnected;
TMSFNCCloudGoogleDrive1.Connect; // opens the Google consent screen
end;
procedure TForm1.DriveConnected(Sender: TObject);
begin
// Tokens are now available; safe to call Drive operations.
TMSFNCCloudGoogleDrive1.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 exporting — binary transfers and exporting Google-native documents
- Managing and sharing — create, move, delete, search, share, account info
- API reference — full class reference