Skip to main content
Connect your Twitter/X account to Chatwoot to manage Direct Messages and track mentions from your unified inbox.

Prerequisites

  • Twitter/X account
  • Twitter Developer account and API access
  • Elevated API access (for DMs)

Setup

1

Create Twitter App

  1. Go to Twitter Developer Portal
  2. Create a new Project and App
  3. Set app permissions to Read, Write, and Direct Messages
  4. Enable OAuth 1.0a
2

Get API credentials

From your Twitter App settings, copy:
  • API Key (Consumer Key)
  • API Secret (Consumer Secret)
  • Access Token
  • Access Token Secret
3

Add Twitter inbox in Chatwoot

Go to SettingsInboxesAdd InboxTwitter
4

Enter credentials

Paste your Twitter API credentials:
  • Consumer Key
  • Consumer Secret
  • Access Token
  • Access Token Secret
5

Configure and test

  • Select which events to track (DMs, mentions, both)
  • Add agents to the inbox
  • Send a test DM to verify connection

Features

Direct Messages

  • Receive and send Twitter DMs
  • Support for media attachments
  • Real-time message sync
  • Thread preservation

Mentions Tracking

  • Monitor when users mention your Twitter handle
  • Respond to mentions as conversations
  • Track brand mentions

Configuration Options

profile_id
string
required
Your Twitter profile ID
twitter_access_token
string
required
OAuth access token from Twitter Developer Portal
twitter_access_token_secret
string
required
OAuth access token secret

API Endpoints

Retrieve Tweets

GET /api/v1/accounts/{account_id}/twitter/tweets

Send Tweet

POST /api/v1/accounts/{account_id}/twitter/tweets
Content-Type: application/json

{
  "text": "Tweet content",
  "in_reply_to": "tweet_id" // optional
}

Best Practices

Respond to DMs within 24 hours
Use mentions tracking for brand monitoring
Set up automation for common DM inquiries
Monitor API rate limits
Keep Twitter credentials secure

Troubleshooting

  • Verify API credentials are correct
  • Check app permissions include Direct Messages
  • Ensure OAuth 1.0a is enabled
  • Confirm API access level is Elevated or higher
  • Check Twitter API rate limits
  • Verify webhook is registered correctly
  • Ensure app has Direct Messages permission
  • Check Chatwoot logs for API errors
  • Verify mentions tracking is enabled in inbox settings
  • Check if your account is mentioned with @ handle
  • Ensure API access includes tweet reading permissions
  • Twitter’s API may have delays (up to 15 minutes)
  • Twitter API has rate limits per 15-minute window
  • Reduce polling frequency in Chatwoot settings
  • Upgrade Twitter API access tier if needed
  • Monitor usage in Twitter Developer Dashboard

Limitations

  • Twitter API rate limits apply
  • Elevated API access required for DMs
  • Mention tracking may have delays
  • Media file size limitations
  • Cannot send tweets directly (only DMs and replies)

Build docs developers (and LLMs) love