Skip to main content

Twitter

Twitter is a social media platform that enables users to share short messages (tweets), follow other users, engage with content, and access real-time information and conversations through its microblogging service.

Twitter icon

Power end-to-end data operations for your Twitter API with Nexla. Our bi-directional Twitter connector is purpose-built for Twitter, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Twitter or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Twitter workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a Twitter credential, you need to obtain your OAuth Consumer Key and Consumer Secret from your Twitter Developer account. Twitter uses OAuth1 authentication for all API requests.

To obtain your Twitter OAuth credentials, follow these steps:

  1. Sign in to your Twitter account using your administrator credentials.

  2. Navigate to the Twitter Developer Portal or visit developer.twitter.com to access your developer account.

  3. If you don't have a developer account yet, click Sign up or Apply for a developer account and complete the application process. You may need to provide information about your intended use of the Twitter API.

  4. Once you have access to the Twitter Developer Portal, navigate to your Projects & Apps or Developer Portal dashboard.

  5. Create a new app or select an existing app from your dashboard. Click on the app name to open its settings.

  6. In the app settings, navigate to the Keys and tokens tab or API Keys section.

  7. Under Consumer Keys, you will find your API Key (Consumer Key) and API Key Secret (Consumer Secret). If these are not visible, click Generate or Create to generate new consumer keys.

  8. Copy both the API Key (Consumer Key) and API Key Secret (Consumer Secret) immediately, as the API Key Secret may not be accessible again after you navigate away from the page.

  9. Store both credentials securely, as you will need them to configure your Nexla credential. The Consumer Secret is sensitive information and should be kept confidential.

The OAuth Consumer Key and Consumer Secret are used in the OAuth1 authentication flow to obtain access tokens. These tokens are then used to authenticate your requests to the Twitter API. If your credentials are compromised, you should immediately revoke them in your Twitter Developer Portal and generate new ones. For detailed information about obtaining OAuth credentials, API authentication, and available endpoints, refer to the Twitter API documentation.

Authenticate

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Twitter

TwitterCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. Twitter uses OAuth1 authentication for all API requests. The OAuth1 authentication flow will be initiated when you save the credential. During the OAuth flow, you will be redirected to Twitter to authorize Nexla to access your Twitter account. After authorization, Nexla will automatically obtain and store the access tokens needed to authenticate API requests.

    Your Twitter OAuth credentials (Consumer Key, Consumer Secret) can be found in the Twitter Developer Portal under your app's Keys and tokens tab. The Consumer Secret is sensitive information and must be kept confidential.

    If your credentials are compromised, you should immediately revoke them in your Twitter Developer Portal and generate new ones. The OAuth credentials provide access to your Twitter account data and should be treated as sensitive information. Keep your credentials secure and do not share them publicly.

    For detailed information about obtaining OAuth credentials, API authentication, and available endpoints, see the Twitter API documentation.

  3. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Twitter connector tile, then select the credential that will be used to connect to the Twitter instance, and click Next; or, create a new Twitter credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Twitter endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

Search Tweets Matching Query

This endpoint template returns a collection of relevant Tweets matching a specified query from your Twitter account. Use this template when you need to search for tweets by keywords, hashtags, or other search criteria for analysis, reporting, or integration purposes.

  • Enter the Search Query in the Search Query field. This should be a UTF-8, URL-encoded search query of 500 characters maximum, including operators. The Search Query determines which tweets will be returned in the search results. You can use Twitter search operators like hashtags, mentions, keywords, and filters.

This endpoint returns a collection of relevant Tweets matching the specified query from your Twitter account, including tweet content, user information, engagement metrics, and metadata. The endpoint uses next URL pagination to handle large result sets efficiently. Nexla will automatically follow the pagination to fetch subsequent pages of search results.

For detailed information about tweet search, API response structures, pagination, and available search operators, see the Twitter API documentation.

Fetch My Tweets and Retweets

This endpoint template returns a collection of the 200 most recent Tweets and Retweets posted by the authenticating user and the users they follow from your Twitter account. Use this template when you need to access your home timeline, recent tweets, or timeline activity for analysis, reporting, or integration purposes.

  • This endpoint automatically retrieves the 200 most recent Tweets and Retweets from your home timeline. No additional configuration is required beyond selecting this endpoint template. The home timeline is central to how most users interact with the Twitter service.

This endpoint returns a collection of the 200 most recent Tweets and Retweets posted by the authenticating user and the users they follow from your Twitter account, including tweet content, user information, engagement metrics, and timeline metadata.

For detailed information about home timelines, API response structures, and available timeline data, see the Twitter API documentation.

Fetch My Most Recent Mentions

This endpoint template returns the 200 most recent mentions (Tweets containing a user's @screen_name) for the authenticating user from your Twitter account. Use this template when you need to access mentions, notifications, or engagement activity for analysis, reporting, or integration purposes.

  • This endpoint automatically retrieves the 200 most recent mentions for the authenticating user. No additional configuration is required beyond selecting this endpoint template.

This endpoint returns the 200 most recent mentions (Tweets containing a user's @screen_name) for the authenticating user from your Twitter account, including mention content, user information, engagement metrics, and mention metadata.

For detailed information about mentions timelines, API response structures, and available mention data, see the Twitter API documentation.

Get User Info

This endpoint template returns a variety of information about the user specified by the screen name from your Twitter account. Use this template when you need to access user profiles, user information, or user metadata for analysis, reporting, or integration purposes.

  • Enter the Screen Name in the Screen Name field. This should be the Twitter screen name (username) of the user whose info you wish to fetch. The Screen Name determines which user's information will be retrieved. The author's most recent Tweet will be returned inline when possible.

This endpoint returns a variety of information about the user specified by the screen name from your Twitter account, including user profile information, follower counts, tweet counts, and the user's most recent Tweet when possible.

For detailed information about user information, API response structures, and available user data, see the Twitter API documentation.

Get User Info from Lookup

This endpoint template gets user info for Twitter screen names stored in a Nexla lookup table. Use this template when you need to batch fetch user information for multiple screen names from a lookup table for analysis, reporting, or integration purposes.

  • Select the Lookup for fetching Screen Names from the Lookup for fetching Screen Names pulldown menu. This should be the Nexla Lookup that contains Screen Names to iterate over. The Lookup determines which screen names will be used to fetch user information.
  • Enter the Screen Name Column Name in Lookup in the Screen Name Column Name in Lookup field. This should be the column name in the lookup table that contains the Twitter screen names. The Screen Name Column Name determines which column will be used to extract screen names from the lookup table.

This endpoint gets user info for Twitter screen names stored in a Nexla lookup table, allowing you to batch fetch user information for multiple screen names efficiently. The endpoint iterates over the lookup table and fetches user information for each screen name in the specified column.

For detailed information about user information, API response structures, and available user data, see the Twitter API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Twitter data sources can also be manually configured to ingest data from any valid Twitter API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Twitter API endpoints follow the pattern https://api.twitter.com/1.1/{endpoint_path}.json. For responses that nest the relevant records inside an array—for example, the statuses array returned by the tweet search endpoint—enter the corresponding path (e.g., $.statuses[*]) in the Set Path to Data in Response field. For a complete list of available Twitter API endpoints, see the Twitter API documentation.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Twitter data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.