X (Twitter) API Configuration Guide for Stackposts (2026 Updated)
Introduction
The X API (formerly Twitter API) allows Stackposts to:
-
Publish tweets
-
Upload images & videos
-
Read profile information
-
Access followers data
-
Send Direct Messages (if enabled)
This guide shows you how to correctly configure an X Developer App for Stackposts.
Step 1: Create an X Developer Account
-
Go to:
👉 https://developer.x.com -
Login with your X account.
-
Open Developer Console
-
Navigate to:
Dashboard → Apps → Create App -
Enter your App name and create the application.
Step 2: Generate API Keys
Click your App → Go to:
Generate:
-
API Key (Consumer Key)
-
API Secret Key
-
Access Token
-
Access Token Secret
-
Bearer Token (optional but recommended)
⚠️ Important: Save these keys immediately. X will not show the full secret again.
Step 3: Configure User Authentication Settings
Inside your App:
Click:
You will see the authentication configuration page.
3.1 App Permissions (Required)
Select:
✅ Read and write
If you need Direct Messages support:
✅ Read, write and Direct message
For Stackposts basic publishing:
👉 Read and write is required
3.2 Type of App (Required)
Select:
✅ Web App, Automated App or Bot
(Confidential client)
❌ Do NOT select Native App.
3.3 App Information
Fill the following fields exactly:
Callback URL / Redirect URL
⚠️ Important:
-
Must match exactly the callback route used by Stackposts
-
Must use HTTPS
-
No extra slash differences
Website URL
Organization Name
Organization URL
Terms of Service URL
Privacy Policy URL
⚠️ Required for production apps.
Click:
Step 4: Verify Access Level
Go to:
You should see:
✅ Elevated Access
If you only have Free or Basic access and posting fails, you may need to upgrade your X API plan.
Step 5: Add API Keys into Stackposts
Login to your Stackposts Admin Panel.
Go to:
Fill in:
-
API Key
-
API Secret
-
Access Token
-
Access Token Secret
-
Bearer Token (optional)
Click Save.
Step 6: Test Connection
-
Go to User Dashboard.
-
Click Add Account.
-
Select X.
-
Authorize your account.
-
If redirected back successfully → Setup is correct.
Common Problems & Solutions
❌ Redirect URI Mismatch
Cause: Callback URL in X does not match Stackposts callback.
Solution: Ensure both are identical:
❌ This application cannot authenticate more users at this time
Cause: Free plan token limit reached.
Solution: Upgrade X API plan or request higher access.
❌ 403 Unauthorized When Posting
Check:
-
App Permission = Read & Write
-
Access Token matches app
-
Elevated Access enabled
-
Keys not regenerated accidentally
❌ Cannot Add X Account in Stackposts
Check:
-
User authentication enabled
-
Callback URL correct
-
Web App selected (not Native)
-
HTTPS enabled on your domain