It is available for use in the Flow web application. For local development or open-source workflows,
ghcr.io/estuary/source-tiktok-marketing:dev provides the latest version of the connector as a Docker image. You can also follow the link in your browser to see past image versions.
This connector is based on an open-source connector from a third party, with modifications for performance in the Flow system. You can find their documentation here, but keep in mind that the two versions may be significantly different.
Supported data resources
The following data resources are supported:
|Ads Reports Hourly||X||X|
|Ads Reports Daily||X||X|
|Ads Reports Lifetime||X||X|
|Advertisers Reports Hourly||X|
|Advertisers Reports Daily||X|
|Advertisers Reports Lifetime||X|
|Ad Groups Reports Hourly||X||X|
|Ad Groups Reports Daily||X||X|
|Ad Groups Reports Lifetime||X||X|
|Campaigns Reports Hourly||X||X|
|Campaigns Reports Daily||X||X|
|Campaigns Reports Lifetime||X||X|
|Advertisers Audience Reports Hourly||X|
|Advertisers Audience Reports Daily||X|
|Advertisers Audience Reports Lifetime||X|
|Ad Group Audience Reports Hourly||X||X|
|Ad Group Audience Reports Daily||X||X|
|Ads Audience Reports Hourly||X||X|
|Ads Audience Reports Daily||X||X|
|Campaigns Audience Reports By Country Hourly||X||X|
|Campaigns Audience Reports By Country Daily||X||X|
By default, each resource is mapped to a Flow collection through a separate binding.
Prerequisites differ depending on whether you have a production or sandbox TikTok for Business account, and on whether you'll use the Flow web app or the flowctl CLI.
OAuth authentication in the web app (production accounts)
If you have a TikTok marketing account in production and will use the Flow web app, you'll be able to quickly log in using OAuth.
A TikTok for Business account with one or more active campaigns.
- Note the username and password used to sign into this account
Sandbox access token authentication in the web app or CLI
If you're working in a Sandbox TikTok for Business account, you'll authenticate with an access token in both the web app and CLI.
- Generate an access token and note the advertiser ID for the Sandbox.
You configure connectors either in the Flow web app, or by directly editing the catalog specification file. See connectors to learn more about using connectors. The values and specification sample below provide configuration details specific to the TikTok Marketing source connector.
The properties in the table below reflect the manual authentication method for Sandbox accounts. If you're using a production account, you'll use OAuth2 to authenticate in the Flow web app, so many of these properties aren't required.
|Authentication Method||Authentication method||object||Required|
|Authentication type||Set to ||string||Required|
|Advertiser ID||The Advertiser ID generated for the developer's Sandbox application.||string|
|Access Token||The long-term authorized access token.||string|
|End Date||The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DD. All data generated between ||string|
|Report Aggregation Granularity||The granularity used for aggregating performance data in reports. Choose ||string|
|Start Date||Replication Start Date||The Start Date in format: YYYY-MM-DD. Any data before this date will not be replicated. If this parameter is not set, all data will be replicated.||string|
|Stream||TikTok resource from which a collection is captured.||string||Required|
|Sync Mode||Connection method.||string||Required|
This sample specification reflects the access token method for Sandbox accounts.
You can choose hourly, daily, or lifetime granularity. For example, if you choose daily granularity, the report will contain one row for each day.