How to Import Data from X Ads Source
Before you start, verify:
- You have X Ads API credentials: Consumer Key, Consumer Secret, Access Token, and Access Token Secret.
- You have your Account ID — find it in your ads.x.com URL (covered in Set Up the Connector below).
- You have set up OWOX Data Marts. You also need at least one storage in Storages — you can configure it later if needed.
Create the Data Mart
Section titled “Create the Data Mart”- Click New Data Mart (available from any page in OWOX Data Marts).
- Enter a title and select the Storage. If you haven’t configured a storage yet, click New Storage to create one now and configure it later.
- Click Create Data Mart.
Set Up the Connector
Section titled “Set Up the Connector”- Select Connector as the definition type.
- Click Set up connector and choose X Ads.
- Fill in the required fields:
- Consumer Key and Consumer Secret – from the Keys & Tokens section of your X developer app.
- Access Token and Access Token Secret – final user tokens from the Credentials Guide.
- Account ID – find it in your ads.x.com URL. For example, in
https://ads.x.com/campaign_form/18ce55in6wt/campaign/new, the Account ID is18ce55in6wt. To add multiple accounts, separate them with commas.
- Leave all other fields as default.
Configure Data Import
Section titled “Configure Data Import”- Choose one of the available endpoints. Start with Ad Performance for daily metrics (impressions, clicks, spend).
- Select the required fields or leave defaults.
- Specify the dataset name in your storage (for example, a BigQuery dataset). OWOX creates it automatically if it doesn’t exist. The table name is auto-generated from the endpoint name (for example,
x_ads_stats). Leave the default if you’re unsure. - Click Finish, then Publish & Run Data Mart.
Run the Data Mart
Section titled “Run the Data Mart”The first run imports data from the 1st of the previous month through today.
The connector does not run again automatically. Set up a trigger to schedule recurring imports.
Schedule Automatic Runs
Section titled “Schedule Automatic Runs”- Open the Triggers tab of your Data Mart.
- Click + Add Trigger.
- Set Trigger Type to
Connector Run. - Choose a schedule: Daily, Weekly, Monthly, or Interval.
- Click Save.
For one-off imports, choose one of the following options. Use Incremental to refresh recent data. Use Backfill to reload a specific historical period — for example, after adding new fields or fixing a data error.
Option 1: Incremental Load
Section titled “Option 1: Incremental Load”Choose Manual Run → Incremental load.
It imports today’s data, plus the number of previous days set in Reimport Lookback Window (default: 2 days). Change this value in the connector’s Advanced Settings tab.
Option 2: Backfill for a Specific Date Range
Section titled “Option 2: Backfill for a Specific Date Range”Choose Manual Run → Backfill (custom period) to load historical data.
- Select the Start Date and End Date.
- Click Run.
The run is complete when the Run History tab shows Success. A first run typically takes a few minutes for small accounts and longer for accounts with large data volumes.
Access Your Data
Section titled “Access Your Data”Once the run completes, OWOX writes data to the dataset you specified. Open your storage console (for example, BigQuery or Snowflake) and navigate to that dataset. Each endpoint creates a separate table named after it — for example, x_ads_stats for Ad Performance data.
Troubleshooting
Section titled “Troubleshooting”Check the Run History tab for error messages. To update credentials or connector settings, open the Data Setup tab of your Data Mart, edit the fields, and click Save. Common errors and fixes:
[UNKNOWN] HttpRequestException: The client application making this request does not have access to Twitter Ads API
X hasn’t approved your Ads API access yet. Return to Step 2: Request Ads API Access in the Credentials Guide and submit the request.
[UNKNOWN] HttpRequestException: Could not authenticate you.
The Consumer Key or Consumer Secret is wrong. Re-enter them from Step 1 or Step 3 of the Credentials Guide.
[UNKNOWN] HttpRequestException: Invalid or expired token.
The Access Token or Access Token Secret in the connector is wrong, revoked, or does not match the other credentials. Redo Steps 4–6 of the Credentials Guide and use the final oauth_token and oauth_token_secret from Step 6.
Update both values in the Data Setup tab. Use the permanent token pair from Step 6, not the temporary token pair from Step 4.
[UNKNOWN] HttpRequestException: Account was not found
Your X account doesn’t have an active Premium or Premium+ subscription required for X Ads Manager. If your subscription is active, double-check the Account ID in your ads.x.com URL and update it in the Data Setup tab.
[UNKNOWN] HttpRequestException: You are not permitted to perform this action
Your X account lacks permission for this endpoint. Re-check your account’s access level and try again.
For anything else:
- Join the Slack Community to ask questions and get help from other users.
- Browse the Q&A section — your question might already be answered.
- Found a bug? Open an issue.
- Join the discussion forum to ask questions or propose improvements.