Skip to content

X credentials#

You can use these credentials to authenticate the following nodes:

Prerequisites#

  • Create an X developer account.
  • Create a Twitter app or use the default project and app created when you sign up for the developer portal. Refer to each supported authentication method below for more details on the app's configuration.

Supported authentication methods#

  • OAuth: Listed as OAuth in n8n, this corresponds to X's OAuth 1.0a authentication method.
  • OAuth2

Refer to X's API documentation for more information about the service. Refer to X's API authentication documentation for more information about authenticating with the service.

Using OAuth#

Note for n8n Cloud users

Cloud users don't need to provide connection details. Select Connect my account to connect through your browser.

If you need to configure OAuth from scratch, create a Twitter app.

Use these settings for your app:

  1. In the app's Keys & tokens > Consumer Keys section, generate or regenerate your keys.
  2. Copy the API Key and add it to n8n as the Consumer Key.
  3. Copy the API Secret and add it to n8n as the Consumer Secret.
  4. In the app's Settings > User Authentication, set appropriate App permissions. Choose Read and write and Direct message if you want to use all functions of the n8n X node.
  5. Select a Type of app.
  6. In App Info, copy the n8n OAuth Redirect URL and paste it in as the Callback URI / Redirect URL.
  7. Add a Website URL.

Refer to X's API Key and Secret documentation for more information on API Keys and Secrets. Refer to X's OAuth 1.0a Authentication documentation for more information on working with this authentication method.

X rate limits

This credential uses the OAuth 1.0a User Context authentication method, so you'll be subject to user rate limits. Refer to X rate limits below for more information.

Using OAuth2#

To configure this credential, you'll need:

  • A Client ID: Generated when you configure a Twitter app for OAuth2.
  • A Client Secret: Generated when you configure a Twitter app for OAuth2.

To generate your Client ID and Client Secret, create a Twitter app.

Use these settings for your app:

  1. In the app's Settings > User Authentication, set appropriate App permissions. Choose Read and write and Direct message if you want to use all functions of the n8n X node.
  2. Select a Type of app.
  3. In App Info, copy the n8n OAuth Redirect URL and paste it in as the Callback URI / Redirect URL.
  4. Add a Website URL.
  5. Copy the Client ID and Client Secret from your Twitter app and enter them into your n8n credential.

Refer to X's OAuth 2.0 Authentication documentation for more information on working with this authentication method.

X rate limits

This credential uses the OAuth 2.0 Bearer Token authentication method, so you'll be subject to app rate limits. Refer to X rate limits below for more information.

Further Reference#

X rate limits#

X has time-based rate limits per endpoint based on your developer access plan level. X calculates app rate limits and user rate limits independently. Refer to Rate limits for the access plan level rate limits and guidance on avoiding hitting them.

Use the guidance below for calculating rate limits:

  • If you're Using OAuth, user rate limits apply. You'll have one limit per time window for each set of users' access tokens.
  • If you're Using OAuth2, app rate limits apply. You'll have a limit per time window for requests made by your app.

X calculates user rate limits and app rate limits independently.

Refer to Rate limits and authentication methods for more information about these rate limit types.