Skip to content

X (formerly Twitter) 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#

  • OAuth2

Deprecation warning

n8n used to support an OAuth authentication method, which used X's OAuth 1.0a authentication method. n8n deprecated this method with the release of V2 of the X node in n8n version 0.236.0.

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.

Refer to Application-only Authentication for more information about app-only authentication.

Using OAuth2#

Use this method if you're using n8n version 0.236.0 or later.

To configure this credential, you'll need:

  • A Client ID
  • A Client Secret

To generate your Client ID and Client Secret:

  1. In the Twitter developer portal, open your project.
  2. On the project's Overview tab, find the Apps section and select Add App.
  3. Give your app a Name and select Next.
  4. Go to the App Settings.
  5. In the User authentication settings, select Set Up.
  6. Set the App permissions. Choose Read and write and Direct message if you want to use all functions of the n8n X node.
  7. In the Type of app section, select Web App, Automated App or Bot.
  8. In n8n, copy the OAuth Redirect URL.
  9. In your X app, find the App Info section and paste that URL in as the Callback URI / Redirect URL.
  10. Add a Website URL.
  11. Save your changes.
  12. Copy the Client ID and Client Secret displayed in X and add them to the corresponding fields in 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.

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 the deprecated OAuth method, 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 X's Rate limits and authentication methods for more information about these rate limit types.