If you want to automatically publish your WordPress posts to X (formerly Twitter), youβll need to generate API credentials from the X Developer Platform.
In this guide, youβll learn how to create the required API keys and connect them with WP Stacy to enable fully automated posting.
π What is X API Token?
The X API allows applications to interact with the platform programmatically.
To post tweets automatically, you need the following credentials:
- API Key
- API Secret Key
- Access Token
- Access Token Secret
These credentials authenticate your app and allow it to post content on your behalf.
π Step-by-Step: Generate X API Token
π§Ύ Step 1: Create X Developer Account
- Go to the X Developer Platform
- Log in with your X account
- Apply for developer access
- Submit your use case and accept terms
π Approval may take some time depending on your application.
β Step 2: Create a Project and App
After approval:
- Open Developer Dashboard
- Click Create Project
- Add a new App under the project
π Your app will generate the API credentials.
βοΈ Step 3: Set App Permissions (Important)
Before generating tokens:
- Open your App settings
- Go to User Authentication Settings
- Set permissions to:
π Read and Write
β οΈ If permissions are set to “Read Only”, your app will not be able to post tweets.
π Step 4: Generate API Keys and Tokens
Now go to the Keys and Tokens section inside your app.
Generate and copy:
- API Key
- API Secret Key
- Access Token
- Access Token Secret
π Save these securely β you may not be able to view them again later.
π Step 5: Regenerate Tokens (If Needed)
If something isnβt working:
- Regenerate the Access Token and Secret
- Update them in your plugin settings
π Old tokens will stop working after regeneration.
βοΈ Step 6: Connect API to WordPress (WP Stacy)
Now connect your X account to WordPress:
- Go to WP Stacy Settings
- Enter:
- API Key
- API Secret
- Access Token
- Access Token Secret
- Save settings
π Step 7: Enable Auto Posting
Once connected:
- Enable Auto Post to X
- Customize:
- Post title format
- Content structure
- Hashtags
Now, every new WordPress post will automatically be shared on X.
β οΈ Common Issues & Fixes
β Tweets Not Posting
- Ensure permissions are set to Read & Write
- Regenerate access tokens
β 401 Unauthorized Error
- Check API credentials carefully
- Make sure there are no extra spaces
β 403 Forbidden Error
- App permissions not configured correctly
- Developer access may be restricted
β Tokens Missing
- Go back to the βKeys and Tokensβ section
- Regenerate credentials
π Security Tips
- Never share your API keys publicly
- Store credentials securely
- Regenerate keys if compromised
π― Final Thoughts
By connecting X API with WP Stacy, you can:
β Automatically post content to X
β Save time with full automation
β Increase traffic and engagement
This setup turns your WordPress website into a powerful automated social publishing system.
