Twitter\_Developer\_Account\_Setup
Updated May 29, 2026, 12:30 PM
Twitter_Developer_Account_Setup
🔑 Twitter API Setup Guide (OAuth 2.0)
To run this application, you’ll need to obtain Twitter API credentials using OAuth 2.0. Follow the steps below to generate your Client ID and Client Secret.
🔗 Twitter Developer Portal
➡ Link: https://developer.twitter.com/en/portal/dashboard
✅ Step-by-Step Instructions
-
Log in to the Twitter Developer Portal
Go to the Twitter Developer Dashboard and sign in with your Twitter account.
-
Create a New Project & App
- Navigate to:
Projects & Apps > Overview - Click "Create App"
- Provide an app name and select OAuth 2.0 as the authentication method
- Navigate to:
-
Configure OAuth 2.0 Settings
- Go to your app's Settings tab
- Under OAuth 2.0, configure:
- Callback URL:
https://your-domain.com/api/login/callback— Replaceyour-domain.comwith your actual domain. It must match exactly as configured in the Twitter Developer Portal.- Website URL:
https://your-deployment-url.com - Client Type: Confidential
- Scopes (Permissions):
tweet.readtweet.writeusers.readoffline.access(required for refresh tokens)
- Website URL:
- Save the changes.
-
Generate OAuth 2.0 Credentials
- Navigate to the Keys and Tokens tab
- Click "Generate" under OAuth 2.0 Client ID and Client Secret
- Copy and store the credentials securely.
🧪 Add to Environment Variables
- Paste your credentials in the
.envfile like you - During one-click deployment, you'll be asked to enter these credentials as environment variables.
below:
TWITTER_CLIENT_ID=your_client_id_here
TWITTER_CLIENT_SECRET=your_client_secret_here
Tweet Character Limits
When using this tool to post tweets via the Twitter (X) API, please note:
- Free Twitter/X Users are limited to 280 characters per tweet.
- If you attempt to tweet more than 280 characters from a free account, the request will fail.
- To unlock longer tweet capabilities (up to 4,000 characters), users must upgrade to Twitter Blue (X Premium).
👉 You can upgrade or learn more here: https://x.com/i/premium_sign_up