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 timeline
  • tweet.write - Create and publish tweets
  • users.read - Read user profile information
  • offline.access - Keep users signed in
  • follows.read - Read user followers and following
  • dm.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/tweets endpoint (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/tweets by default - OAuth consent will succeed, but the first publish returns client-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:

  1. Go to developer.x.com
  2. Click Sign up and follow the authentication flow
  3. Accept the Developer Agreement
  4. Complete your developer profile
  5. Create a new project or join an existing one

Step 2: Create an App

  1. Navigate to your project dashboard at developer.x.com/portal
  2. Click Create App or select your existing app
  3. 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 timeline
    • tweet.write - Create and publish tweets
    • users.read - Read user profile information
    • offline.access - Keep users signed in
    • follows.read - Read user followers and following
    • dm.write - Create and publish direct messages

Step 3: Configure OAuth 2.0

  1. In your app settings, navigate to User authentication settings

  2. Enable OAuth 2.0 as the authentication method

  3. 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
    • Website URL: Your application's website
    • Privacy Policy URL: Your privacy policy page
    • Terms of Service URL: Your terms of service page
  4. Click Save to save your OAuth 2.0 settings

Step 4: Obtain Your Credentials

  1. Navigate to your app's Keys and tokens tab

  2. 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
  3. 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

  1. Log in to Outstand Dashboard
  2. Navigate to SettingsSocial Networks
  3. Select X (Twitter) from the dropdown
  4. Enter your Client ID in the "Client ID / API Key" field
  5. Enter your Client Secret in the "Client Secret / API Secret" field
  6. 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:

  1. Navigate to Accounts in your Outstand dashboard
  2. Click Connect Account
  3. Select X (Twitter)
  4. Complete the X authorization flow
  5. 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

RequirementSpecification
FormatsJPG, PNG, GIF, WEBP
Maximum size5 MB (the exact cap varies by media_category)
Items per postUp to 4 images

Animated GIFs

RequirementSpecification
FormatsGIF
Maximum size15 MB
Items per post1 (a GIF cannot be combined with other media)

Video

RequirementSpecification
FormatsMP4, MOV
Maximum size512 MB
Duration0.5 seconds to 140 seconds
Dimensions32x32 (min) to 1280x1024 (max)
Frame rateUp to 60 FPS (H264 High Profile recommended)
Aspect ratio16:9 or 1:1 recommended
Items per post1

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 tierCreate post limit
Free17 posts per 24 hours (per user and per app)
Basic100 posts per 24 hours per user (commonly documented)
Pro / EnterpriseHigher 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:

  1. Create posts for X using the Posts API
  2. Upload media for your tweets via the Media API
  3. Schedule posts for optimal engagement using the scheduling features