Authentication
TTMSFNCCloudFileConversion talks to a hosted conversion service using a
simple API key rather than an interactive OAuth flow, so getting started only
takes selecting a backend and setting one credential — there is no consent
screen, redirect URI, or refresh token to manage, unlike the OAuth-based
cloud components in this pack. This chapter covers choosing a service and
setting the API key.
Selecting a service and setting the API key
Service selects which hosted backend actually performs the conversion —
fcsCloudConvert (the default), fcsConvertIO, or fcsZamzar — and the
component talks to that provider's own REST API behind the scenes, so the
formats and limits available depend on which one you pick. Get an API key
from the chosen provider's dashboard and set it on APIKey before calling
any conversion method; every request fails immediately with an exception if
APIKey is empty.
procedure TForm1.FormCreate(Sender: TObject);
begin
TMSFNCCloudFileConversion1.Service := fcsCloudConvert;
TMSFNCCloudFileConversion1.APIKey := 'your-api-key';
end;
Switching Service later in the same session is supported and re-initializes
the underlying backend adapter cleanly — set a new APIKey for the new
provider first, since the two are not interchangeable, and any jobs already
tracked against the previous provider will no longer resolve.
Common mistakes
- Leaving
APIKeyempty. Every conversion call raises an exception immediately ('Please fill in the API Key.') rather than failing asynchronously — set it before the first call, typically inOnCreate. - Using an API key from the wrong provider. The key must match the
provider selected by
Service; a CloudConvert key does not work withfcsZamzarset, for example. - Assuming every format is supported everywhere.
TTMSFNCCloudFileConversionFileFormatis a single shared enum across all three providers, but the actual set of input and output formats a conversion accepts depends on the selected service — check the provider's own documentation before relying on a less common format.
Related API
TTMSFNCCloudFileConversion—Service,APIKey