Short answer
Create a developer account and app at the X developer portal, generate keys with write permission, post through the API v2 create-post endpoint from a script on a schedule, label the account as automated, and budget for pay-per-use API costs.
Key takeaways
- Use a separate account for the bot and add X's Automated label.
- Post on a schedule and avoid replying or following automatically at scale.
- Every API call costs money under 2026 pricing; keep the bot lean.
The best X bots do one thing well: post the daily air quality, a random museum artwork, the next train delays. Building one is a weekend project. Running it within X's rules and budget takes a little planning.
What do I need?
A separate X account for the bot, a developer account, an app with write access, and somewhere to run a script.
- Create the bot's X account and fill in its profile.
- Sign in to the X developer portal with it and create a project and app.
- Set the app's permissions to Read and write.
- Generate the keys and access tokens. Store them as secrets, never in public code.
- Pick where the script runs: a small server, a scheduled cloud function or a CI job.
How does posting work?
Your script calls the API v2 endpoint that creates a post, authenticated with your app's tokens.
In outline: build the text, call the create-post endpoint with OAuth user authentication, check the response, log the post ID. Libraries for Python and JavaScript handle the authentication. Run it on a schedule, such as every morning at 7.
How do I label it?
Turn on the automated account label and link the human account that manages it.
In the bot's settings, look for Automation under Your account, and choose the managing account. Readers then see an "Automated" label, which is both a courtesy and a rule for many kinds of bots.
What rules apply?
No spam, no fake engagement, no unsolicited mass replies or mentions, no following sprees.
| Fine | Not fine |
|---|---|
| Scheduled informational posts | Auto-replying to strangers with promotions |
| Replying to people who mention the bot | Mass following or liking |
| Reposting your own organization's posts | Posting the same content across many accounts |
| Clear Automated label | Pretending to be a person |
What does it cost?
Under X's 2026 pay-per-use pricing, each API call is charged; a once-a-day posting bot is cheap, a bot that reads and replies constantly is not.
Check the developer portal for current per-call prices and design the bot to make as few calls as possible. See the X API explained.
Questions people ask
Do I need to code to make an X bot?
Simple bots can be built with no-code automation services that support X, but they still use the API and its costs. A short Python or JavaScript script gives you the most control.
What kinds of bots are allowed?
Bots that post useful information (weather, transit, earthquakes, art, reminders) are welcome when labeled. Spam, fake engagement and mass unsolicited replies are banned.
How do I add the Automated label?
In the bot account's settings, under Your account > Automation, link the managing (human) account. The label then shows on the bot's profile and posts.