X Ads Setup Guide
Follow our setup guide to connect X Ads to Fivetran.
Fivetran supports two authorization modes: standard OAuth 1 and custom API credentials. How we connect to X Ads depends on the authorization mode you are using. Follow the setup instructions for your authorization mode:
Setup instructions for standard OAuth 1
Prerequisites
To connect X Ads to Fivetran, you need an X account with access to at least one active X Ads account with ACCOUNT_ADMIN, AD_MANAGER, or CAMPAIGN_ANALYST permissions, and at least one campaign and one promotable user in that X Ads account. Learn more in X Ads Multi-user login FAQs. Multi-user login differs from the delegate feature.
Configure Fivetran
- In the connection setup form, enter the Destination schema name of your choice. This is used as the connection name and cannot be modified once the connection is created.
- Click Authorize. You will be redirected to X.
- Click Authorize app to grant access. You'll return to Fivetran.
- Choose your Sync Mode: Sync All Accounts or Sync Specific Accounts. If you select Sync Specific Accounts, a list of available accounts will appear for you to choose from.
- Select how many months of reporting data you want to include in your initial sync.
- Click Save & Test. Fivetran will verify the connection and begin syncing your X Ads data.
Setup instructions for custom API credentials
Prerequisites
To connect X Ads to Fivetran, you need:
- An X account with access to at least one active X Ads account with
ACCOUNT_ADMIN,AD_MANAGER, orCAMPAIGN_ANALYSTpermissions. - At least one campaign and one promotable user in the X Ads account.
- An X app with access to the X Ads API.
Apply for a developer account
If you already have a developer account, skip ahead to the Create X application step.
Go to X Apply for access page.
Click Apply for a developer account.
Select Build customized solutions in-house.
Input your organization details and explain how you intend to use the X data in subsequent application screens. We recommend adding the following paragraph to the use case description field:
I will use the data from the X API to pull my advertising data and load it into my destination for internal analytics. The types of questions that I will answer using this data are as follows: 1) What types of ads are performing best? 2) What ads are resonating most with my audience? 3) How are my ads on X performing relative to the other publishers? This type of analysis is essential to optimizing my ad spend. I am only planning to use the data for the advertising campaigns that I run on the platform and will not be using the API to trigger actions on the platform, such as Tweets or liking content. I am not planning to use any of the data that I pull externally.
X may take a few days to approve your developer account.
Create X application
If you already have an application that you want to connect to Fivetran, skip ahead to the Submit Ads API application form step.
After your developer account is approved, log in to the X Developer Portal.
On the Overview page, go to the Standalone Apps section.
Click Create App.
Enter the name of your app, then click Complete.
Make a note of the API key and API secret key. You will need them to configure Fivetran.
You can also find the keys in the Keys and tokens tab of your app dashboard.
Submit Ads API application form
Go to the X Ads API application form.
Fill out and submit the form.
Set permissions for your app
Go to your X app dashboard.
Select the app that you want to connect to Fivetran. It is either the app you created in the Create X application step or an existing app.
In the app dashboard, go to the Settings tab.
In the App permissions section, click Edit.
Set the permissions to Read, then click Save.
Generate access token and secret
In the app dashboard, go to the Keys and tokens tab.
In the Authentication Tokens section, generate your access token and secret.
Make a note of the access token and access token secret. You will need them to configure Fivetran.
Finish Fivetran configuration
In the connection setup form, enter the Destination schema name of your choice. This is used as the connection name and cannot be modified once the connection is created.
Set the Custom API credentials toggle to ON.
Enter the Consumer Key and Consumer Secret for your X application.
Enter the Access Token and the Access Token Secret you created in the Generate access token and secret step.
Choose your Sync Mode: Sync All Accounts or Sync Specific Accounts. If you select Sync Specific Accounts, then select the accounts you want to sync.
Select how many months of reporting data you want to include in your initial sync.
Click Save & Test. Fivetran will verify the connection and sync your X Ads data.