X (Twitter)
Configure X (Twitter) in Outstand with your own API credentials (BYOK) for full control over the OAuth flow and white-label connections.
X (formerly Twitter) is fully supported in Outstand only through the Bring Your Own Key (BYOK) model. This allows you to use your own X API credentials, giving you complete control over the OAuth flow and ensuring your customers never see Outstand branding during account connection.
Quick Information
Our application works with the following OAuth scopes:
tweet.read- Read user tweets and timelinetweet.write- Create and publish tweetsusers.read- Read user profile informationoffline.access- Keep users signed infollows.read- Read user followers and followingdm.write- Create and publish direct messages
Whether you use Managed Keys or BYOK, these are the OAuth scopes required for the integration to work.
Our API supports only OAuth2.0 flows.
Prerequisites
Before you begin, ensure you have:
- An X (Twitter) developer account with approved API access
- An active access plan on the
POST /2/tweetsendpoint (see the note below) - Understanding of OAuth 2.0 flows
Important: As of February 2026, X closed the legacy Free/Basic/Pro tiers to new sign-ups and moved new developers to a pay-per-usage credit model. A brand-new developer app is not enrolled on
POST /2/tweetsby default - OAuth consent will succeed, but the first publish returnsclient-not-enrolled. Make sure your app is enrolled under a project with an active access plan (pay-per-use or a legacy tier if your account still has one) before connecting. Check your developer portal dashboard for the plan and limits that apply to your account, and see X's pricing and tiers for details.
Step 1: Create an X Developer Account
If you don't already have one:
- Go to developer.x.com
- Click Sign up and follow the authentication flow
- Accept the Developer Agreement
- Complete your developer profile
- Create a new project or join an existing one
Step 2: Create an App
- Navigate to your project dashboard at developer.x.com/portal
- Click Create App or select your existing app
- Fill in the required information:
- App name: Your application name (e.g., "My Company Social Media Manager")
- App environment: Production (or Development for testing)
- App permissions: Select the permissions you need:
tweet.read- Read user tweets and timelinetweet.write- Create and publish tweetsusers.read- Read user profile informationoffline.access- Keep users signed infollows.read- Read user followers and followingdm.write- Create and publish direct messages
Step 3: Configure OAuth 2.0
-
In your app settings, navigate to User authentication settings
-
Enable OAuth 2.0 as the authentication method
-
Configure the following settings:
- App permissions: Select the appropriate scopes (see above)
- Type of App: Web App
- Callback URL / Redirect URL:
- For production:
https://www.outstand.so/app/api/socials/x/callback
- For production:
- Website URL: Your application's website
- Privacy Policy URL: Your privacy policy page
- Terms of Service URL: Your terms of service page
-
Click Save to save your OAuth 2.0 settings
Step 4: Obtain Your Credentials
-
Navigate to your app's Keys and tokens tab
-
You'll find two crucial values:
- API Key (Client ID): This is your OAuth 2.0 Client ID
- API Secret (Client Secret): This is your OAuth 2.0 Client Secret
-
Click Generate if your keys haven't been generated yet
Security Note: Your API Secret is only shown once when first generated. Save it immediately in a secure location. If you lose it, you'll need to regenerate new keys from the X Developer Portal.
Step 5: Add Credentials to Outstand
Once you have your Client ID and Client Secret, you can add them to Outstand using either method:
Method 1: Using the Dashboard
- Log in to Outstand Dashboard
- Navigate to Settings → Social Networks
- Select X (Twitter) from the dropdown
- Enter your Client ID in the "Client ID / API Key" field
- Enter your Client Secret in the "Client Secret / API Secret" field
- Click Add Social Network
Method 2: Using the API
curl -X POST https://api.outstand.so/v1/social-networks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "x",
"client_key": "YOUR_CLIENT_ID_HERE",
"client_secret": "YOUR_CLIENT_SECRET_HERE"
}'Step 6: Connect Your X Account
After adding your credentials:
- Navigate to Accounts in your Outstand dashboard
- Click Connect Account
- Select X (Twitter)
- Complete the X authorization flow
- Your X account will appear in your connected accounts list
Troubleshooting
"Invalid client credentials"
- Verify you copied the Client ID and Client Secret correctly (no extra spaces)
- Ensure you haven't regenerated the keys without updating Outstand
- Check that your app has OAuth 2.0 enabled in the developer portal
"Redirect URI mismatch"
- Verify the callback URL in your X app settings matches the Outstand callback URL
- Contact support if you're unsure of the correct callback URL
"Insufficient permissions"
- Ensure your app has the required permissions enabled (
tweet.write,users.read,offline.access) - You may need to request elevated access for certain operations
Media Requirements
Media is validated by X at publish time. The following limits come from X's official API media documentation - see Media best practices.
Text
- Post length: 280 characters (standard). Verified/Premium accounts can publish up to 25,000 characters (longform). See Counting characters. Character counting is based on Unicode NFC-normalized code points, and URLs are always counted as 23 characters.
Images
| Requirement | Specification |
|---|---|
| Formats | JPG, PNG, GIF, WEBP |
| Maximum size | 5 MB (the exact cap varies by media_category) |
| Items per post | Up to 4 images |
Animated GIFs
| Requirement | Specification |
|---|---|
| Formats | GIF |
| Maximum size | 15 MB |
| Items per post | 1 (a GIF cannot be combined with other media) |
Video
| Requirement | Specification |
|---|---|
| Formats | MP4, MOV |
| Maximum size | 512 MB |
| Duration | 0.5 seconds to 140 seconds |
| Dimensions | 32x32 (min) to 1280x1024 (max) |
| Frame rate | Up to 60 FPS (H264 High Profile recommended) |
| Aspect ratio | 16:9 or 1:1 recommended |
| Items per post | 1 |
A single post may contain either up to 4 images, or 1 animated GIF, or 1 video - the media types cannot be mixed.
Publishing Rate Limits
X enforces posting limits on the POST /2/tweets endpoint that depend on your access tier. These are per user and per app over a rolling 24-hour window. See X API rate limits and the Manage Posts introduction.
| Access tier | Create post limit |
|---|---|
| Free | 17 posts per 24 hours (per user and per app) |
| Basic | 100 posts per 24 hours per user (commonly documented) |
| Pro / Enterprise | Higher limits - see your developer portal |
- The endpoint also enforces a technical limit of 200 requests / 15 minutes per user and a combined 300 requests / 3 hours across Manage Posts and Manage Retweets.
- Important: As of February 2026 X moved new developers to a pay-per-usage credit model, and the legacy Free/Basic/Pro tiers are closed to new sign-ups. The per-tier figures above apply to legacy-tier accounts. Check your developer portal dashboard for the limits that apply to your account.
Important Notes
-
Premium Access: For high-volume use cases, you may need to apply for premium access tiers or Twitter API Enterprise.
-
Credential Security: Never commit your Client ID or Client Secret to version control. Use environment variables or secure credential management tools.
Next Steps
Once your X credentials are configured and accounts connected, you can: