X (Twitter)

The X (Twitter) component connects with the X API v2. The component posts tweets and executes custom API requests to the X platform.

Credentials

To authenticate the component, create an app in the X Developer Portal. The component uses OAuth 1.0a for authentication.

The following credential fields are required:

Consumer key

The Consumer API key from your X Developer App.

Consumer secret

The Consumer API secret from your X Developer App.

Access token key

The authentication access token from your X Developer App.

Access token secret

The authentication access secret from your X Developer App.

Triggers

This component has no trigger functions. This means it can not be selected as the first component in an integration flow design.

Actions

This component has two actions.

Post tweet

Posts a new tweet to X.

Input metadata

Text

A required string field for the text content of your tweet.

Output metadata

id

The unique identifier of your tweet (required string).

text

The text content of your tweet (required string).

edit_history_tweet_ids

A list of tweet IDs in the edit history (required array).

Make raw request

Executes a custom request to the X API.

Input metadata

URL

A required string field. The path of the resource (for example, /2/users/me).

Method

A required string field. The HTTP verb to use (GET, POST, PUT, PATCH, DELETE).

Request Body or Query

An optional object field. The body for POST, PUT, PATCH methods, or the query parameters for GET and DELETE methods.

Output metadata

headers

The HTTP headers of the response (required object).

responseBody

The HTTP response body (optional object).

Usage examples

The following examples show how to get logged user information with creation date.

Using the URL field

Make raw request action configured with query parameters in the URL field.
Figure 1. Make raw request configuration using URL with query parameters
{
  "method": "GET",
  "url": "/2/users/me?user.fields=created_at"
}

Using the Request Body or Query field

Make raw request action configured with query parameters in the data field.
Figure 2. Make raw request configuration using the Request Body or Query field
{
  "method": "GET",
  "url": "/2/users/me",
  "data": {
    "user.fields": "created_at"
  }
}

Known limitations

The X API has rate limits that apply to all requests.