Twitter "This Request Looks Like It Might Be Automated" — Error 226, and How to Fix It

By Alex Chen•10 min read
Two distinct paths out of Twitter error 226 — one for regular users locked out of the app, one for developers whose script was blocked as automated
Error 226 hits two very different audiences — the fix is different for each.

When X says "This request looks like it might be automated", that is error 226: X decided the request looked automated and refused to complete it. The exact wording varies by surface, but the meaning is the same everywhere, and so is the way out: diagnose which kind of 226 you have, stop the behavior that triggered it, wait, recover the account, and, if you are a developer, move your public-data reads onto an API key.

Two very different people land on this page. If you are a regular user who got locked out while browsing or posting normally, the block is usually temporary and there is a clear path back. If you are a developer whose bot or tweepy/twikit script started returning 226, the block is telling you the script itself is the problem, and the durable answer is to stop running it against your account.

The part most pages get wrong is the developer advice. Retrying harder, rotating proxies or tweaking the script keeps the same account producing the same automated traffic, which is exactly what X is reacting to. The step that ends the problem is stopping that traffic.

Live API capability

TwitterAPI.io reads public X data with an API key instead of your X login, so a busy script gets tweets back instead of 226 blocks and your personal account stays out of the pipeline

01 — Section

What Error 226 Actually Is — HTTP Status vs Body Code

Error 226 is X's automation block. X runs automation checks on the client that made the login request (and on later requests from that client), and when the activity looks like a script rather than a person, it returns the block instead of the content or action you asked for.

Critical distinction — the 226 is in the response body, not the HTTP status. The transport-layer status code your client receives is HTTP 403 Forbidden. The string 226 is the X-specific error code carried in the JSON body — typically {"errors":[{"code":226,"message":"This request looks like it might be automated..."}]}. RFC 7231's HTTP 403 means "server understood the request, but refuses to authorize it"; X uses 226 as its app-level identifier for why it refused. A correct error handler reads both layers: branch on HTTP status first (403 vs 401 vs 429), then on body code (226 vs other 4xx X error codes) for the precise reason.

It is not just about credentials. A correctly authenticated request can still return 226 if the behavior around it looks scripted. Equally, a real person on a VPN or a fresh device can get it as a false positive.

What 226 is not: it is not the rate-limit error — that is HTTP 429 with body code 88, and it has its own page. It is not an authentication error — that is HTTP 401. And note that HTTP 226 itself is a real but unrelated HTTP status (RFC 3229's "IM Used" for delta encoding); X is not returning that, and confusing the two costs you debug time. 226-in-body always rides on HTTP 403. It is also not the sign-in refusal that tells you to use the official X app (LoginError.AttestationDenied); that is a device and app integrity check at log-in, covered in our guide to the official X app sign-in error.

02 — Section

The Exact Message You're Seeing

If you are searching for the wording to find this page, here are the variants — they all mean error 226:

In the web or mobile app: a banner or modal that reads "This request looks like it might be automated. To protect our users from spam and other malicious activity, we can't complete this action right now." Usually with no obvious way to dismiss it.

In an API response: the JSON body carries {"errors":[{"code":226,"message":"This request looks like it might be automated. To protect our users from spam and other malicious activity, we can't complete this action right now. Please try again later."}]}

In a Python script using tweepy: a tweepy.errors.Forbidden or generic API error containing the 226 code and message in its body.

In a browser-automation tool (twikit, browserless scrapers): typically a navigation error or a redirected page that loads only the block screen. The underlying response is the same 226.

03 — Section

Diagnose Which 226 You Have

Before changing anything, work out where the block came from. Three questions settle it:

Was a script involved? If a bot, scraper, browser-automation tool or library logged in as your account, the 226 is about that script. If you were only using the official app or website by hand, it is most likely a false positive.

Where did it appear? In the app it shows as a banner on an action such as posting, following or logging in. In code it shows as HTTP 403 with code 226 in the body. A 429 with code 88 is a rate limit, and a 401 is an authentication problem; neither is 226.

What changed recently? A new device, a VPN or Tor connection, a burst of likes or follows, or a newly deployed script are the usual triggers. Whatever changed just before the first 226 is the thing to undo.

04 — Section

If You're a Regular User — How to Recover

If you are not running a bot or a scraper, this is almost always temporary. In order:

Stop the action that triggered it. If you were on a burst (many likes, follows or replies in a short window), pause. Retrying the same action over and over keeps the block in place.

Wait. The block often clears on its own within minutes to a few hours, once your activity looks normal again.

Recover the account. Add a phone number and confirm your email if you have not. If X shows a captcha or SMS challenge, complete it; that usually lifts the block immediately. If you are on a VPN or Tor, switch to your normal connection and try again.

Do not install a "fix". Tools that ask for your password, install browser extensions or route your traffic through their servers are either scams or a fast route to a permanent suspension. The verification path is the only safe one.

05 — Section

If You're a Developer — Stop the Script, Then Recover

If your tweepy / twikit / Selenium / Puppeteer script started returning 226, treat it as a signal about the script, not a puzzle to solve. The script is logging in as a real account and producing traffic X does not allow from a user session.

Stop the script now. Kill the job, the cron entry and any retry loop. Every further attempt from the same account adds to the record that triggered the block, and repeated attempts are what move an account from a temporary block toward a lock or suspension.

Wait, then recover the account by hand. Give it a few hours. Then log in through the official app or website, complete any verification X asks for, and change the password if the script stored it somewhere. Revoke any session cookies or tokens the script held.

Do not restart the same script. Proxies, new user agents and slower loops change how the traffic looks, not what it is: an automated client acting as your account. The same account will hit the same wall, and the account is what you stand to lose.

Read public data through an API key instead. If the script existed to collect public posts, profiles or searches, that part does not need your X login at all. It can run through a data API that you authenticate with a key, which keeps your personal account out of the pipeline entirely.

06 — Section

Reading Through an API Key

The path most developer projects end up on is moving the public-data read off the logged-in account entirely and onto an API you call with a key.

TwitterAPI.io is one of those APIs. You authenticate with an X-API-Key header, not an X login, so there is no account of yours for X to block, and a busy script gets data back instead of 226. Tweet endpoints cost $0.15 per 1,000 tweets returned, pay-per-use with no monthly minimum.

The cost is easy to reason about. A project pulling 100,000 posts a month costs about $15 at that rate. For comparison, the official X API lists $0.005 per post read (docs.x.com/x-api/getting-started/pricing), which is about $500 for the same 100,000 posts.

It is not the right path for every project. If you need ads data or other official-only data, the official API is the only route, and a write action (posting, following) always runs as an X account whichever API sends it. For the common case of reading public posts, profiles and searches, an API key removes the account from the equation. See the pricing page for the per-result rates; an API key is one Google sign-in, and new accounts that pass the automatic bot check get up to $1 of free credits (at most 100,000 credits, one per person or network, expiring after 31 days), enough for end-to-end testing.

07 — Section

Code: Read Public Data With an API Key

The snippet below replaces a logged-in script with a single keyed API call that returns the same kind of data. The endpoint is /twitter/user/last_tweets: one HTTP GET, no browser, no X login.

Swap the userName for any public account and the same pattern collects its timeline. For broader collection (keywords, hashtags, multi-account watchlists), the search endpoint takes a full advanced-search query — same shape, same predictability.

python
import requests

API_KEY = "your_api_key"

# Replaces a logged-in script that was returning 226: one GET, no browser, no X login.
r = requests.get(
    "https://api.twitterapi.io/twitter/user/last_tweets",
    params={"userName": "nasa"},
    headers={"X-API-Key": API_KEY},
    timeout=30,
)
r.raise_for_status()
body = r.json()

for t in body["data"]["tweets"]:
    print(t["createdAt"], "::", t["text"][:80])

# Page through with the response cursor when you need more.
if body.get("has_next_page"):
    print("more available — pass next_cursor on the next call")
Side-by-side terminal — a scraper hitting X directly returns the 226 error, the same call through twitterapi.io returns 20 tweets
Same data request: through a logged-in script, a 226 block. Through an API key: 20 tweets.

Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.

08 — Questions

Questions readers ask

What is Twitter error 226?

Error 226 is X's automation block: X judged that the activity around your request looked like a bot or script and refused to complete it. It is not a credential error or a rate-limit error; it rides on an HTTP 403 response with code 226 in the body.

How long does a 226 block last?

For a regular user, often minutes to a few hours, once your activity looks normal again. Adding a phone number, completing any verification challenge that appears, or turning off a VPN usually clears it sooner. For an account driven by a script, it keeps coming back as long as the script keeps running; stopping the script is the first step.

Can I appeal a 226 block?

There is no formal appeal because 226 is not a suspension — it is a temporary block on the request, not the account. The way through it is verification (phone, email, captcha) or simply waiting; X's standard appeal flow is for account-level actions like suspension, not for individual request blocks.

Do proxies fix error 226?

No. A proxy changes where the traffic comes from, not what it is: the same script acting as the same account. Rotating through proxies after a 226 is the kind of repeated attempt that can turn a temporary block into a lock or suspension. Stop the script, wait, recover the account, and move public-data reads onto an API key.

Why are libraries like tweepy and twikit getting blocked now?

Because they act as a logged-in user from a script. twikit and similar tools drive your account's session from code, and X checks for exactly that, so a stock install gets flagged quickly, especially from a cloud server. The block is about the account being automated, not about the library's version.

Is using a third-party API safer than scraping?

For reading public data, yes. With a data API you authenticate with a key, not your X login, so there is no personal account in the request path for X to block, and you are buying a service rather than running a script against the platform.

Does using a third-party API instead of scraping violate Twitter's terms?

Reading public data through a paid data API is a different posture from running a script that logs in as your account. You call the provider's HTTP API with a key; your own X account is not involved. The exact terms depend on your jurisdiction and use case, so read the provider's terms for your situation.

Will reducing my request rate help?

Not reliably. Slowing down changes how soon the block lands, not whether it lands, because the issue is that a script is acting as your account. Stop the script and move the read to an API key.

Why am I getting 226 on a legitimate, low-volume request?

Usually because something about the session looks unusual: a VPN or Tor connection, a cloud server IP, a fresh device, or an outdated client. The fix is the same as for any user: stop, wait, verify the account and switch off the VPN. If you are a developer, move the read onto an API key so your account is not involved.

Can my X account get suspended for triggering 226?

Not for the block itself. What can lead to suspension is the response to the block: scripts that keep retrying, rotating through proxies, or any other attempt to keep the same automated traffic going. Hitting 226 once is a warning; stopping at that point is what keeps it from becoming a strike.

Does TwitterAPI.io trigger error 226?

No. You call TwitterAPI.io with an API key, not with an X login, so there is no account of yours for X to flag. You call the endpoint and get the data back.

Is HTTP 226 the same as Twitter error 226?

No, and conflating them sends debugging in the wrong direction. HTTP 226 "IM Used" is an RFC 3229 status for delta encoding — completely unrelated to automation detection. The 226 that triggers "this request looks like it might be automated" is an X application-level error code in the JSON body of an HTTP 403 Forbidden response. Read the status code and the body code separately: status 403 + body code 226 is the automation block; status 226 alone (which X does not return) would be a delta-encoding signal you'd handle very differently.

09 — Further reading

Continue

More from this series

Writing about something you built with TwitterAPI.io? Our community rewards program pays API credits for honest tutorials, build logs and videos.

Build it

Stop reading. Start building.

Starter credits cover real testing on real data. Google sign-in, no card, no application queue.

Get an API key

Already building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.