Twitter_Developer_Account_Setup
Last updated
Was this helpful?
Last updated
Was this helpful?
🔑 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.
➡ Link:
Log in to the Twitter Developer Portal
Go to the 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
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
— Replace your-domain.com
with 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.read
tweet.write
users.read
offline.access
(required for refresh tokens)
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.
Paste your credentials in the .env
file like you
During one-click deployment, you'll be asked to enter these credentials as environment variables.
below:
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: