plugins/omi-twitter-chat-tools-app/README.md
Post tweets and manage your Twitter/X account through Omi chat.
TWITTER_CLIENT_ID=your_client_id
TWITTER_CLIENT_SECRET=your_client_secret
TWITTER_REDIRECT_URI=https://your-app.up.railway.app/auth/twitter/callback
requirements.txtrailway.toml configPORT and REDIS_URL environment variablesAfter deployment, update your Twitter app's callback URL:
https://your-app.up.railway.app/auth/twitter/callback
When creating/updating the Omi app, use these URLs:
| Field | Value |
|---|---|
| Setup URL | https://your-app.up.railway.app/?uid={{uid}} |
| Setup Completed URL | https://your-app.up.railway.app/setup/twitter?uid={{uid}} |
| Chat Tools Manifest URL | https://your-app.up.railway.app/.well-known/omi-tools.json |
| Endpoint | Description |
|---|---|
/tools/post_tweet | Post a new tweet |
/tools/get_timeline | Get home timeline |
/tools/get_my_tweets | Get your own tweets |
/tools/get_mentions | Get mentions |
/tools/search_tweets | Search tweets |
/tools/like_tweet | Like a tweet |
/tools/unlike_tweet | Unlike a tweet |
/tools/retweet | Retweet |
/tools/delete_tweet | Delete a tweet |
/tools/get_user_profile | Get user profile |
| Endpoint | Description |
|---|---|
/ | Home page / setup UI |
/auth/twitter?uid=<uid> | Start OAuth flow |
/auth/twitter/callback | OAuth callback |
/setup/twitter?uid=<uid> | Check setup status |
/disconnect?uid=<uid> | Disconnect account |
/health | Health check |
/.well-known/omi-tools.json | Chat tools manifest |
.env.example to .env and fill in your credentialsTWITTER_REDIRECT_URI=http://localhost:8080/auth/twitter/callbackpip install -r requirements.txtpython main.py| Variable | Description | Required |
|---|---|---|
TWITTER_CLIENT_ID | Twitter OAuth2 Client ID | Yes |
TWITTER_CLIENT_SECRET | Twitter OAuth2 Client Secret | Yes |
TWITTER_REDIRECT_URI | OAuth callback URL | Yes |
PORT | Server port (default: 8080) | No |
REDIS_URL | Redis connection URL | No (uses file storage if not set) |
Be aware of Twitter API rate limits:
The integration handles rate limits gracefully and will return appropriate error messages.
This integration requires Twitter API v2 access. Depending on your Twitter Developer account tier:
Some features (like viewing timeline) may require elevated access.