Skip to content
Stackposts
Product guide

X (Twitter) API Official

X (Twitter) API Configuration Guide for Stackposts (2026 Updated) Introduction The X API (formerly Twitter API) allows Stackposts to: Publish tweets Upload images & vi...

3 mins read
StackPosts guide

X (Twitter) API Official

Use this guide to configure the connection safely, then verify the account and permissions before you publish or automate.

Use this guide

  1. Prepare the provider credentials and callback values required for this connection.
  2. Enter them in the related settings area, save, and connect one safe test account.
  3. Verify the returned name, status, and permissions before using the connection.

Detailed steps

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

  1. Go to:
    👉 https://developer.x.com

  2. Login with your X account.

  3. Open Developer Console

  4. Navigate to:

     
     
    Dashboard → Apps → Create App
     
  5. Enter your App name and create the application.


Step 2: Generate API Keys

Click your App → Go to:

 
 
Keys & Tokens
 

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:

 
 
User Authentication Settings → Set up
 

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

 
 
https://yourdomain.com/app/x/profile
 

⚠️ Important:

  • Must match exactly the callback route used by Stackposts

  • Must use HTTPS

  • No extra slash differences


Website URL

 
 
https://yourdomain.com
 

Organization Name

 
 
Your Company Name
 

Organization URL

 
 
https://yourdomain.com
 

Terms of Service URL

 
 
https://yourdomain.com/terms-of-service
 

Privacy Policy URL

 
 
https://yourdomain.com/privacy-policy
 

⚠️ Required for production apps.


Click:

 
 
Save Changes
 

Step 4: Verify Access Level

Go to:

 
 
Dashboard → Project Overview
 

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:

 
 
Settings → Social Networks → X (Twitter)
 

Fill in:

  • API Key

  • API Secret

  • Access Token

  • Access Token Secret

  • Bearer Token (optional)

Click Save.


Step 6: Test Connection

  1. Go to User Dashboard.

  2. Click Add Account.

  3. Select X.

  4. Authorize your account.

  5. 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:

 
 
https://yourdomain.com/app/x/profile
 

❌ 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

 

Quick check

  • The save or publish action completes without an error.
  • The visible status, preview, or connected account matches the change.
  • If the result differs, capture the exact message and review the troubleshooting guidance before retrying.
Still need help?

Tell us where you are stuck.

Share the product, the step you reached, and any error shown. Our team can point you in the right direction.