---
title: "Connect your app to X (Twitter)"
description: "<p><a href=\"https://x.com/\">X</a> is a social platform for public posts and conversations."
---

> Documentation Index
> Fetch the complete documentation index at: https://rshift.helpcent.re/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your app to X (Twitter)

<p><a href="https://x.com/">X</a> is a social platform for public posts and conversations. The X (Twitter) connector lets your RShift Sites app call the <a href="https://docs.x.com/x-api/introduction">X API v2</a> using an app-only Bearer token from your X Developer account. It's designed for apps that look up profiles, search recent public posts, or build read-only social dashboards.</p>
<p>X is available as an <a href="/sites/integrations/app-connectors/">app + chat connector</a>: one shared connection that works in the project chat while you build and in your published apps.</p>
<p>With X, your app can:</p>
<ul>
<li>Look up users by username or ID</li>
<li>Search recent public posts</li>
<li>Read public post metadata by ID</li>
<li>Build dashboards and integrations on top of X API v2 data</li>
</ul>
<p>The connector uses an app-only Bearer token, so it supports read-only access to public data. It cannot post, like, follow, or send DMs on behalf of a user account. It's a good fit for profile lookups, keyword monitoring, and public content feeds.</p>
<h2>Common use cases and example apps</h2>
<table>
<thead>
<tr>
<th style="text-align: left">Example app</th>
<th style="text-align: left">Example prompt</th>
<th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left"><strong>Profile lookup page</strong></td>
<td style="text-align: left"><em>Use X and build a page that shows profile info for an X username.</em></td>
<td style="text-align: left"><strong>Display public profile details from X.</strong><br />The app fetches user metadata by username and renders name, handle, and other public fields.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Keyword monitoring dashboard</strong></td>
<td style="text-align: left"><em>Use X and build a dashboard that searches recent posts on X for a keyword.</em></td>
<td style="text-align: left"><strong>Track public conversation around a topic.</strong><br />The app queries recent post search results and presents them in a filterable feed.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Social proof widget</strong></td>
<td style="text-align: left"><em>Use X and build a widget that shows recent posts from a list of accounts.</em></td>
<td style="text-align: left"><strong>Surface curated public posts in your app.</strong><br />The app looks up posts by ID or username and renders a timeline-style view.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Influencer directory</strong></td>
<td style="text-align: left"><em>Use X and build a directory where I enter usernames and see follower counts and bios.</em></td>
<td style="text-align: left"><strong>Aggregate public profile stats for a roster of accounts.</strong><br />The app batches user lookups and displays bios and metrics in a table.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Event hashtag tracker</strong></td>
<td style="text-align: left"><em>Use X and build a live feed of posts matching an event hashtag.</em></td>
<td style="text-align: left"><strong>Monitor public posts for a campaign or event.</strong><br />The app searches recent posts for a hashtag and refreshes results on a schedule.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Competitive mentions board</strong></td>
<td style="text-align: left"><em>Use X and build a board that tracks recent posts mentioning our brand name.</em></td>
<td style="text-align: left"><strong>Watch brand mentions across public posts.</strong><br />The app runs scheduled searches and highlights new matches for the team.</td>
</tr>
<tr>
<td style="text-align: left"><strong>Research and reporting tool</strong></td>
<td style="text-align: left"><em>Use X and build an internal tool that exports recent posts about a topic as JSON.</em></td>
<td style="text-align: left"><strong>Pull public post data for analysis or reporting.</strong><br />The app searches and fetches post metadata through the gateway for downstream use.</td>
</tr>
</tbody>
</table>
<h2>How to connect X</h2>
<p>Workspace <strong>admins</strong> and <strong>owners</strong> can connect X.</p>
<p>You can create multiple X connections using different Bearer tokens, which is useful for separating environments (for example, development and production) or using tokens from different X apps.</p>
<p>When the connection is created, X becomes available across all projects in the workspace. Anyone building in a project can ask RShift Sites in the project chat to <a href="/sites/integrations/app-connectors/#link-a-connection-to-a-project">link their project</a> to it.</p>
<h3>Prerequisites</h3>
<p>Before connecting X, make sure you have:</p>
<ul>
<li>An <a href="https://developer.x.com/">X Developer account</a></li>
<li>An X app with an app-only Bearer token</li>
<li>RShift Sites workspace <strong>owner</strong> or <strong>admin</strong> role</li>
</ul>
<blockquote>
<p><strong>Note</strong></p>
<p>All API requests made through this connector count toward your X API access tier and rate limits. Billing and quota are handled directly by X, not RShift Sites.</p>
</blockquote>
<h3>Step 1: Get an X app-only Bearer token</h3>
<p>An app-only Bearer token lets your RShift Sites app authenticate with the X API v2 for read-only public data. You generate it in the X Developer Portal for a specific app.</p>
<p>To create an X Bearer token:</p>
<p><strong>Open the X Developer Portal</strong></p>
<p>Sign in to the <a href="https://developer.x.com/en/portal/dashboard">X Developer Portal</a>.</p>
<p><strong>Create or open a project and app</strong></p>
<p>Create a <strong>Project</strong> and <strong>App</strong> if you do not have one yet, or open the app you want to use.</p>
<p><strong>Open keys and tokens</strong></p>
<p>In your app settings, go to <strong>Keys and tokens</strong> (or <strong>User authentication settings</strong> → <strong>Keys and tokens</strong>, depending on your portal layout).</p>
<p><strong>Generate the Bearer token</strong></p>
<p>Under <strong>Authentication Tokens</strong>, find <strong>Bearer Token</strong> and click <strong>Generate</strong> (or <strong>Regenerate</strong>). Copy the token and store it securely.</p>
<blockquote>
<p><strong>Danger</strong></p>
<p>Your Bearer token functions like a password. Keep it secure and never share it publicly. You'll need it in the next step.</p>
</blockquote>
<p>See X documentation for details on access tiers, endpoints, and rate limits: <a href="https://docs.x.com/x-api/introduction">X API introduction</a>.</p>
<h3>Step 2: Connect X to RShift Sites</h3>
<p>You can create multiple connections using different Bearer tokens.</p>
<p><strong>Open X in Connectors</strong></p>
<p>Go to <strong>Connectors</strong> and select <strong>X (Twitter)</strong>.</p>
<p><strong>Add a connection</strong></p>
<p>Click <strong>Add connection</strong>.</p>
<p><strong>Configure the connection</strong></p>
<ol>
<li><strong>Display name</strong>: name the connection, for example <code>X Prod</code>. This name is only used inside RShift Sites to identify the connection.</li>
<li><strong>Bearer token</strong>: paste your app-only Bearer token from the X Developer Portal.</li>
</ol>
<p><strong>Choose who can use this connection</strong></p>
<p>Under <strong>Sharing</strong>, the connection is private to you by default and shows a <strong>Private</strong> label. To share it, click <strong>Share with others</strong>. Then add workspace members by email, or click <strong>Invite entire workspace</strong> to make the connection available to everyone in your RShift Sites workspace.</p>
<pre><code>See [Who can use connections and clients](/sites/integrations/admin-controls/#who-can-use-connections-and-clients) for more information.
</code></pre>
<p><strong>Connect</strong></p>
<p>Click <strong>Connect</strong>. RShift Sites verifies the token against the X API before saving the connection.</p>
<p>When connected, anyone building in a project can ask RShift Sites in the project chat to link their project to X (based on configured connection-level access). Your RShift Sites apps can then look up users and search recent public posts through the connector.</p>
<h2>Limitations</h2>
<p>The X connector is read-only with an app-only Bearer token. It cannot:</p>
<ul>
<li>Post, reply, like, repost, or follow on behalf of a user</li>
<li>Send or read direct messages</li>
<li>Access protected accounts or a user's private timeline</li>
<li>Support per-end-user X login. Each connection uses a single shared Bearer token across all projects linked to it</li>
<li>Bypass X API rate limits. Cache results, back off on <code>429</code> responses, and avoid tight polling loops</li>
</ul>
<p>If you revoke or regenerate the Bearer token in the X Developer Portal, update the connection in RShift Sites with the new token before API calls can succeed again.</p>
<h2>Manage your {connector_0} connection</h2>
<p>Connections are managed from <a href="https://lovable.dev/dashboard?connectors"><strong>Connectors</strong></a>: select <strong>{connector_0}</strong>, then open the connection.</p>
<ul>
<li><strong>Unlink projects</strong> to remove {connector_0} access from specific projects while keeping the connection available for others. See <a href="/sites/integrations/app-connectors/#unlink-projects-from-a-connection">Unlink projects from a connection</a> for the steps.</li>
<li><strong>Delete the connection</strong> to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use {connector_0} stop working until a new connection is added. See <a href="/sites/integrations/app-connectors/#delete-a-connection">Delete a connection</a> for the steps and who can delete.</li>
</ul>
<h2>Related topics</h2>
<ul>
<li><a href="/sites/integrations/workday/">Connect your app to Workday</a></li>
<li><a href="/sites/integrations/notion/">Connect your app to Notion</a></li>
<li><a href="/sites/integrations/granola/">Connect your app to Granola</a></li>
<li><a href="/sites/integrations/slack/">Connect your app to Slack</a></li>
<li><a href="/sites/integrations/inngest/">Connect your app to Inngest</a></li>
</ul>

Source: https://rshift.helpcent.re/sites/integrations/x/index.mdx
