---
title: Connect X
description: Create an X developer app, enter its credentials in Distrosauce, and connect your X account so replies can be posted from Slack.
canonical: https://distrosauce.com/docs/social-listening/connect-x
last_updated: 2026-11-14
---

# Connect X

This page shows how to connect X to social listening. X needs two things: an API Bearer Token, which lets Distrosauce search X for your keywords, and an OAuth connection to your X account, which lets you post replies straight from Slack.

You need the owner or admin role. X credentials are needed only if you monitor X.

## 1. Create the X developer app

1. Go to developer.x.com and create a project and an app.
2. Under "Keys and Tokens", generate a "Bearer Token" and copy it.

## 2. Set up OAuth 2.0

1. In the X developer portal, open your app's "OAuth 2.0 Keys" section and choose "Edit settings".
2. Set the app type to "Web App".
3. Set the redirect (callback) URI to the address you open Distrosauce at, followed by `/api/social-listening/auth/callback`. For example, if your browser shows Distrosauce at `{your-distrosauce-address}`, the URI is `{your-distrosauce-address}/api/social-listening/auth/callback`.
4. Copy the "Client ID" and "Client Secret" from the "OAuth 2.0 Keys" section.

## 3. Enter the credentials in Distrosauce

Open **Settings > Social Listening** and open the **Twitter / X** card. Under **Credentials**, fill in these fields:

| Field | What to paste |
|---|---|
| **API Bearer Token** | the Bearer Token, used for search |
| **Client ID** | the OAuth 2.0 Client ID |
| **Client Secret** | the OAuth 2.0 Client Secret |

Fill in the three Slack fields on the same card too (see [Connect Slack](https://distrosauce.com/docs/social-listening/connect-slack)), then press **Save changes**.

## 4. Connect your X account

1. On **Settings > Social Listening**, find the **X/Twitter OAuth** card.
2. Press **Connect X/Twitter**. It stays greyed out, with "Configure Client ID and Client Secret first", until the **Client ID** is saved.
3. Authorize the app on X. When it finishes, you are back on **Settings > Social Listening**, the page says "X/Twitter OAuth connected successfully", and the card shows **Connected**.

When you connect, Distrosauce asks X for permission to read and write posts, read your profile, and stay connected (the X scopes `tweet.read`, `tweet.write`, `users.read` and `offline.access`). If the connection fails, the page says "OAuth error:" followed by a short code.

Without the OAuth connection, X posts still reach Slack, with the same buttons as LinkedIn and Reddit: you reply on X yourself and mark it done. See [Act on posts in Slack](https://distrosauce.com/docs/social-listening/slack-replies).

## How X search works

- Each keyword is searched on X as an exact phrase.
- Only English-language posts are returned.
- Reposts and replies are left out: only original posts are found.
- X results include follower counts, so X has a **Follower floor** setting and a **Max results per query** setting. See [Persona, thresholds and scanning](https://distrosauce.com/docs/social-listening/settings).
- A reply posted to X can be at most 280 characters. A draft longer than that cannot be posted with one click; use "Edit & post" to shorten it first.

## If X posting is unavailable, or a post failed

When X posting cannot work, the Slack message says "X posting unavailable: connect X or add credits" and shows the LinkedIn-style buttons instead of a post button that would fail. When a post fails, the Slack message says "Not posted" with the reason, and the feed shows the post as **Post failed**.

The reasons a post can fail:

| Reason shown | What to do |
|---|---|
| the reply is over 280 characters | shorten it with "Edit & post" and post again |
| the draft is over 280 characters | use "Edit & post" to shorten it |
| X credits or usage limit | add credits or raise the limit in your X developer account; posting is offered again after 24 hours, or at once when you reconnect X |
| X connection expired or revoked | press **Connect X/Twitter** again on **Settings > Social Listening** |
| X is not connected | connect X as in step 4 |
| X refused this reply | X declined this particular reply; reply on X yourself if you still want to |
| X rate limit, try again shortly | wait a few minutes and try again |

Also check:

- The **X/Twitter OAuth** card shows **Connected**.
- The **Client ID** and **Client Secret** are saved on the **Twitter / X** card. Both are needed before connecting.
- The connection can expire. If posting stops working, reconnect with **Connect X/Twitter**.

## What's next

- [Choose keywords and filters](https://distrosauce.com/docs/social-listening/keywords)
- [Persona, thresholds and scanning](https://distrosauce.com/docs/social-listening/settings)
