> ## 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.

# Twitter v2

> Integrate your application with the Twitter v2 API

## 🚀 Quickstart

Connect to Twitter v2 with Nango and see data flow in 2 minutes.

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Twitter v2*.

**2. Authorize Twitter v2**

Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to Twitter. Later, you'll let your users do the same directly from your app.

**3. Call the Twitter v2 API**

Let's make your first request to the Twitter v2 API. Replace the placeholders below with your [Environment API key](https://nango.dev/docs/reference/backend/http-api/api-keys.md), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl "https://api.nango.dev/proxy/2/users/me" \
>   -H "Authorization: Bearer <NANGO-API-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>"
> ```

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
>
> const res = await nango.get({
>     endpoint: '/2/users/me',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>'
> });
>
> console.log(res.data);
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/primitives/auth.md) to integrate Nango in your app.

To obtain your own credentials, follow the setup guide linked below.

## 📚 Twitter v2 Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Twitter v2 OAuth app](https://nango.dev/docs/api-integrations/twitter-v2/how-to-register-your-own-twitter-v2-api-oauth-app)\
  Register an OAuth app with Twitter and obtain credentials to connect it to Nango

Official docs: [Twitter v2 API docs](https://developer.twitter.com/en/docs/authentication/oauth-2-0/user-access-token)

## 🧩 Pre-built syncs & tools for Twitter v2

Explore Nango-provided tools in your dashboard. Extend and customize them to fit your needs.

### Others

| Function name | Description | Type |
| - | - | - |
| `bookmark-tweet` | Bookmark a tweet for an authenticated user. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-liked-tweet` | Create a liked tweet in Twitter/X | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-list` | Create a list in Twitter/X | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-tweet` | Create a tweet in Twitter/X. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-liked-tweet` | Remove a liked tweet (unlike) for the authenticated user. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-list` | Delete a List owned by the authenticated user | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-tweet` | Delete or archive a tweet in Twitter/X | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `follow-user` | Follow a user from the authenticated account. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-liked-tweet` | Retrieve a single liked tweet from Twitter/X by its ID. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-list` | Retrieve a single list from Twitter/X | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-mention` | Retrieve a single mention from Twitter/X. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-space` | Retrieve a single space from Twitter/X | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-tweet` | Retrieve a single tweet from Twitter/X. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-user` | Retrieve a single user from Twitter/X | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `like-tweet` | Like a tweet | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-liked-tweets` | List liked tweets from a specific Twitter/X user | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-lists` | List all Lists owned by a specified user from X API | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-mentions` | List mentions from Twitter/X for a specified user. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-spaces` | List Spaces from Twitter/X matching a search query | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-tweets` | List tweets from a specific Twitter/X user timeline. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-users` | List users from Twitter/X by IDs or usernames | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `remove-bookmark` | Remove a tweet bookmark | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `unfollow-user` | Unfollow a user from the authenticated account | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `unlike-tweet` | Unlike a Tweet | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-list` | Update a list in Twitter/X. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `liked-tweets` | Sync liked tweets from Twitter/X | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `lists` | Sync lists from Twitter/X. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `mentions` | Sync mentions from Twitter/X | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `spaces` | Sync spaces from Twitter/X using the search endpoint | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `tweets` | Sync tweets from Twitter/X user timeline | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `users` | Sync users from Twitter/X | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.