Twitter Ads API Configuration
Request
POST https://api.fivetran.com/v1/connections
{
"group_id": "group_id",
"service": "twitter_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": "THREE | SIX | TWELVE | TWENTY_FOUR | ALL_TIME",
"is_custom_api_credentials": true,
"accounts": [
"string"
],
"schema": "schema_name"
},
"auth": {
"consumer_key": "twitter_key",
"consumer_secret": "twitter_secret",
"client_access": {
"client_secret": "string",
"client_id": "string"
},
"oauth_token": "twitter_access_token",
"oauth_token_secret": "twitter_access_token_secret"
}
}
Config parameters
Name | Description |
---|---|
sync_mode | Whether to sync all accounts or specific accounts. |
timeframe_months | Historical sync timeframe in months. |
is_custom_api_credentials | Custom API credentials |
accounts | Specific Accounts to sync. Must be populated if sync_mode is set to SpecificAccounts . |
schema | 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
oauth_token
,oauth_token_secret
,consumer_key
andconsumer_secret
parameters in theauth
section.POST https://api.fivetran.com/v1/connections
{ "service": "twitter_ads", "group_id": "group_id", "auth": { "oauth_token": "twitter_access_token", "oauth_token_secret": "twitter_access_token_secret", "consumer_key": "twitter_key", "consumer_secret": "twitter_secret" } }
Auth Parameters
Name Description consumer_key
The Twitter App consumer key. consumer_secret
The Twitter App consumer secret. oauth_token
The Twitter App access token. oauth_token_secret
The Twitter App access token secret. By using the Connect Card or the Fivetran dashboard.