Social listening
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#
- Go to developer.x.com and create a project and an app.
- Under "Keys and Tokens", generate a "Bearer Token" and copy it.
2. Set up OAuth 2.0#
- In the X developer portal, open your app's "OAuth 2.0 Keys" section and choose "Edit settings".
- Set the app type to "Web App".
- 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. - 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), then press Save changes.
4. Connect your X account#
- On Settings > Social Listening, find the X/Twitter OAuth card.
- Press Connect X/Twitter. It stays greyed out, with "Configure Client ID and Client Secret first", until the Client ID is saved.
- 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.
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.
- 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.