> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Twitter v2 with Nango

> Register an OAuth app with Twitter and connect it to Nango

This guide shows you how to register your own app with Twitter to obtain your OAuth credentials (client id & secret). These are required to let your users grant your app access to their Twitter account.

<Note>The OAuth1 and OAuth2 APIs give access to different data. Both are supported by Nango. This guide covers OAuth 2.0.</Note>

## Creating a Twitter OAuth 2.0 App

<Steps>
  <Step title="Sign up for a Twitter Developer Account">
    If you don't already have one, sign up for a [Twitter Developer account](https://developer.twitter.com/en/portal/petition/essential/basic-info). You'll need to verify your email and phone number.
  </Step>

  <Step title="Create a new Project and App">
    In the [Twitter Developer Portal](https://developer.twitter.com/en/portal/dashboard):

    1. Navigate to the Projects & Apps section
    2. Create a new Project (if you don't have one)
    3. Create a new App within your Project
  </Step>

  <Step title="Configure User Authentication Settings">
    Within your App settings:

    1. Go to the **User authentication settings** section
    2. Click **Set up** to configure OAuth 2.0
    3. Select **OAuth 2.0** as the authentication type
    4. Choose the appropriate **Type of App** (typically Web App, Automated App or Bot, or Native App)
    5. Add your callback URL from Nango (find this in your [Nango integration settings](https://app.nango.dev/dev/integrations))
  </Step>

  <Step title="Get your OAuth 2.0 credentials">
    After setting up user authentication:

    1. Your **Client ID** will be displayed in the User authentication settings
    2. Generate a **Client Secret** if you haven't already
    3. Save both the Client ID and Client Secret securely

    <Warning>The Client Secret is only shown once. Make sure to save it immediately.</Warning>
  </Step>

  <Step title="Configure OAuth scopes">
    Select the scopes your application needs. Common scopes include:

    * `tweet.read` - Read tweets
    * `users.read` - Read user profile information
    * `offline.access` - Get refresh tokens for long-lived access

    For a complete list of available scopes, see [Twitter's OAuth 2.0 scopes documentation](https://developer.twitter.com/en/docs/authentication/oauth-2-0/authorization-code#:~:text=a%20public%20client.-,Scopes,-Scopes%20allow%20you).
  </Step>

  <Step title="Add credentials to Nango">
    In your [Nango integration settings](https://app.nango.dev/dev/integrations):

    1. Find your Twitter v2 integration
    2. Add your **Client ID** and **Client Secret**
    3. Configure any required OAuth scopes
    4. Save your settings
  </Step>
</Steps>

<Note>Twitter also offers a client credentials flow that authorizes as an app instead of a user. This is listed under `twitter-oauth2-cc` in Nango. For more details, check [Twitter's client credentials flow documentation](https://developer.x.com/en/docs/authentication/oauth-2-0/application-only).</Note>

## Access Requirements

Twitter's access levels and requirements vary by use case:

| Requirement       | Status | Comment                             |
| ----------------- | ------ | ----------------------------------- |
| Paid dev account  | ❓      | Varies by API access level          |
| Paid test account | ❓      |                                     |
| Partnership       | ❓      | May be required for elevated access |
| App review        | ❓      | Required for certain access levels  |
| Security audit    | ❓      |                                     |

<Tip>Need help getting started? Get help in the [community](https://nango.dev/slack).</Tip>

For more details on Twitter's OAuth 2.0 implementation, see [Twitter's OAuth 2.0 documentation](https://developer.twitter.com/en/docs/authentication/oauth-2-0/user-access-token).

***
