Tiktok Ads API Configuration
Request
POST https://api.fivetran.com/v1/connections
{
"group_id": "group_id",
"service": "tiktok_ads",
"trust_certificates": true,
"trust_fingerprints": true,
"run_setup_tests": true,
"paused": false,
"pause_after_trial": false,
"sync_frequency": 1440,
"data_delay_sensitivity": "NORMAL",
"data_delay_threshold": 0,
"daily_sync_time": "14:00",
"schedule_type": "auto",
"connect_card_config": {
"redirect_uri": "https://your.site/path",
"hide_setup_guide": true
},
"proxy_agent_id": "proxy_agent_id",
"private_link_id": "private_link_id",
"networking_method": "Directly",
"hybrid_deployment_agent_id": "hybrid_deployment_agent_id",
"config": {
"sync_mode": "AllAccounts | SpecificAccounts",
"timeframe_months": "TWENTY_FOUR | SIX | ALL_TIME | TWELVE | THREE",
"accounts": [
"string"
],
"attribution_window_size": "TWENTY_EIGHT | FOURTEEN | ONE | SEVEN",
"custom_reports": [
{
"report_type": "auction_basic_campaign_report",
"metrics": [
"string"
],
"table_name": "table_1",
"dimensions": [
"string"
],
"aggregate": "daily"
}
],
"schema": "schema_name"
},
"auth": {
"access_token": "my_access_token",
"client_access": {
"client_secret": "my_client_secret",
"client_id": "my_client_id"
}
}
}
Config parameters
Name | Description |
---|---|
sync_mode | Whether to sync all advertiser accounts or specific accounts. |
timeframe_months | Number of months' worth of reporting data you'd like to include in your initial sync. This cannot be modified once the connector is created. Default value: THREE . |
accounts | Specific accounts to sync. Must be populated if sync_mode is set to SpecificAccounts . |
attribution_window_size | Rollback sync duration to capture conversions. Set this to your configured attribution window in TikTok Ads. The default value is 7 days. |
custom_reports | Title of Custom Report |
custom_reports[0].report_type | Type of report to be generated |
custom_reports[0].metrics | Metrics to be synced |
custom_reports[0].table_name | Destination Table name of report |
custom_reports[0].dimensions | Dimensions to synced |
custom_reports[0].aggregate | Time aggregation of report |
schema (required) | Destination schema name. Schema name is permanent and cannot be changed after connection creation |
Authorization
There are two ways to authorize this connector type:
- By specifying the values for the
client_access
andaccess_token
parameters in theauth
section.POST https://api.fivetran.com/v1/connections
{ "service": "tiktok_ads", "group_id": "group_id", "auth": { "client_access": { "client_secret": "my_client_secret", "client_id": "my_client_id" }, "access_token": "my_access_token" } }
Auth Parameters
Name Description access_token
The long-lived Access token
carries the information necessary to access API resources.client_access
Your application client access fields client_access.client_secret
Client Secret
of your TikTok Ads client application.client_access.client_id
Client ID
of your TikTok Ads client application.If you use your own OAuth application, grant Fivetran read access permissions to all the endpoints. By using the Connect Card or the Fivetran dashboard.