Skip to content

How to obtain credentials for the X Ads source

To use the X Ads connector, you need to generate the required API credentials by registering and configuring an app in the X Developer Portal. Follow the steps below to complete the setup.

Step 1: Create and Configure Your Developer App

Section titled “Step 1: Create and Configure Your Developer App”

Visit the X Developer Portal and sign in with your account.

After signing up, an app will be created for you automatically.

⚠️ Note: If X prompts you to upgrade your account, select the Free tier to continue without additional charges.

X Ads Billing

To begin using the X Ads API, you need to request access. Follow the steps below to complete the process.

Fill out the official X Ads API Access Request Form.

Alternatively, you can direct message @AdsSupport for assistance.

You’ll need to provide your X Developer App ID, which can be found on your app’s detail page:

X Ads App ID

Describe how you intend to use the API.

Here’s an example:

“We are advertisers looking to connect with the X Ads API to access campaign data for analysis and optimization. The data will be pulled via the OWOX Data Marts platform and used to support strategic decision-making across our marketing efforts.”

In the field “What level of Ads API access do you need?”, choose Standard Ads API access.

X Ads Form Example

After submitting the form, wait for confirmation. Once your request is approved, you will receive an email notification.

X Ads Request Approved

Once approved, you’ll be ready to proceed with connecting your app to the X Ads API.

Step 3: Set Up App Permissions and Callback URL

Section titled “Step 3: Set Up App Permissions and Callback URL”

Navigate to the User Authentication Settings and click the Edit button.

X Ads Edit

Under App Permissions, select Read and write.

X Ads Permissions

Set the Callback URI to: http://localhost

Leave other fields (including Type of App) as default and click Save.

X Ads Localhost

Navigate to the Keys and Tokens tab.

In the API Key and Secret section:

  • Click Regenerate
  • Save your API Key and API Secret

X Ads Tokens

Make a POST request to https://api.twitter.com/oauth/request_token.

In the Authorization tab, use the following OAuth 1.0 settings:

  • Signature Method: HMAC-SHA1
  • Consumer Key: your API Key from Step 4
  • Consumer Secret: your API Secret from Step 4
  • Callback URL: http://localhost (must match the one from Step 3)

X Ads Postman

Click Send. The response will look like:

oauth_token=E4MQKQAAAAAB1yCFAAABl2OHH80&oauth_token_secret=UlDQaqOoJHj1VvLQ8fQH6Iq686rEFww2&oauth_callback_confirmed=true

Copy the oauth_token value (E4MQKQAAAAAB1yCFAAABl2OHH80 in the example above) and insert it into the following URL:

https://api.twitter.com/oauth/authorize?oauth_token=YOUR_OAUTH_TOKEN

Open the URL in your browser and click Authorize App.

X Ads Authorize

You will be redirected to a URL containing oauth_token and oauth_verifier.

X Ads Verifier

Make a POST request to https://api.twitter.com/oauth/access_token.

In the Authorization tab, use the following OAuth 1.0 settings:

  • Consumer Key: your API Key
  • Consumer Secret: your API Secret
  • Access Token: the oauth_token from Step 6
  • Access Token Secret: the oauth_token_secret from Step 5
  • Callback URL: http://localhost
  • Verifier: the oauth_verifier from the previous step

X Ads Postman

Click Send. The response will include your permanent tokens:

oauth_token=1534231826281152515-kDGnM70as1fh6xoYWK9HvlwtDHHqe8&oauth_token_secret=KiXVKSyHifVoVm7vq3iC7zjclE1ocqvgpouS95RuLXM61&user_id=1534231826281152213&screen_name=examplename

You now have all the credentials required to use the X Ads connector:

  • Consumer Key (API Key) – from your X Ads App (Step 4)
  • Consumer Secret (API Secret) – from your X Ads App (Step 4)
  • Access Token (oauth_token) – from Step 7
  • Access Token Secret (oauth_token_secret) – from Step 7

Refer to the Getting Started Guide to complete the setup.

If you encounter any issues after saving your credentials in the Google Sheet:

  1. Check if there is a specific error message.
  2. Browse the Q&A section — your question might already be answered.
  3. To report a bug or technical issue, open a GitHub issue.
  4. Join the discussion forum to ask questions, share feedback, or suggest improvements.