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

# X (Twitter) OAuth 2.0 connector profile – StackOne setup guide

> Set up the OAuth 2.0 connector profile for X (Twitter) in StackOne. One-time admin setup required before your users can link X (Twitter) accounts via Hub.

<Warning>An X Developer account with an approved project and app is required. Apply at developer.x.com if you do not have access.</Warning>

<section data-guide-section data-guide-scopes="">
  <h2>Create an X Developer App</h2>

  <p>You need an X Developer app to obtain OAuth 2.0 credentials.</p>

  <Steps>
    <Step title="Open the X Developer Portal">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Go to <a href="https://developer.x.com/en/portal/dashboard" target="_blank" rel="noopener noreferrer">X Developer Portal</a> and sign in with your X account.</p>
      </div>
    </Step>

    <Step title="Create a project and app">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the left sidebar, click <strong>Projects & Apps</strong> > <strong>Overview</strong>, then click <strong>+ Create App</strong> or <strong>+ New Project</strong> to create a new project and app.</p>

        <ul>
          <li>Enter a project name and use case, then click <strong>Next</strong>.</li>
          <li>Enter an app name and click <strong>Complete</strong>.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Enable OAuth 2.0 User Authentication</h2>

  <p>Configure your app to support OAuth 2.0 user authentication.</p>

  <Steps>
    <Step title="Open app settings">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>From your app's dashboard, click <strong>App Settings</strong>, then under <strong>User authentication settings</strong>, click <strong>Set up</strong>.</p>
      </div>
    </Step>

    <Step title="Configure authentication settings">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Fill in the required fields.</p>

        <ul>
          <li>Set <strong>App permissions</strong> to the required access level (e.g., Read and Write and Direct Messages).</li>
          <li>Set <strong>Type of App</strong> to <strong>Web App, Automated App or Bot</strong> for confidential clients, or <strong>Native App</strong> for public clients (PKCE only).</li>
          <li>Under <strong>App info</strong>, enter a <strong>Callback URI</strong> (redirect URI) — see next step.</li>
        </ul>
      </div>
    </Step>

    <Step title="Add the redirect URI">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the <strong>Callback URI / Redirect URL</strong> field, enter the following URI and click <strong>Save</strong>.</p>

        <ul>
          <li>`https://api.stackone.com/connect/oauth2/x/callback`</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Copy OAuth 2.0 Client Credentials</h2>

  <p>Retrieve the Client ID and, if using a confidential client, the Client Secret.</p>

  <Steps>
    <Step title="Open Keys and Tokens">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Navigate to your app's <strong>Keys and Tokens</strong> tab.</p>
      </div>
    </Step>

    <Step title="Copy Client ID and Client Secret">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Under <strong>OAuth 2.0 Client ID and Client Secret</strong>, copy the <strong>Client ID</strong>.</p>

        <ul>
          <li>If your app is a confidential client, click <strong>Regenerate</strong> to generate a Client Secret and copy it. Store it securely for use later — it will not be shown again.</li>
          <li>Public clients (PKCE only) do not require a Client Secret; leave that field blank.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

## Creating the StackOne Connector Profile

To create the Connector Profile in StackOne for <strong>X (Twitter)</strong>:

<Steps>
  <Step title="Navigate to Connector Profiles">
    Login to StackOne and navigate to [Connector Profiles](https://app.stackone.com/connector_profiles)
  </Step>

  <Step title="Create New Connector Profile">
    <ul>
      <li>Click <strong>+ Connector Profile</strong></li>
      <li>Search for and select <strong>X (Twitter)</strong></li>
      <li>Select <strong>Type</strong> as <strong>OAuth 2.0</strong></li>

      <li>
        Fill out the fields using details retrieved from your provider:

        <ul style={{ marginLeft: '20px' }}>
          <li><strong>Client ID</strong></li>
          <li><strong>Client Secret</strong> (Optional)</li>
          <li><strong>Scopes</strong> (Optional)</li>
        </ul>
      </li>

      <li>(Optional) Select <strong>Actions</strong> to be enabled for this Connector Profile</li>
      <li>Click <strong>Create profile</strong></li>
    </ul>
  </Step>
</Steps>

Congratulations! The new Connector Profile will now show up in your project ready to be used. You can now continue to <a href="/guides/accounts-section#linking-accounts">Link Accounts</a> for <strong>X (Twitter)</strong>.
