GetXAPI

Error Reference

Every error the GetXAPI Twitter/X API can return, what it means, and when a retry helps. HTTP status codes, X error codes, and per-endpoint handling.

This page lists the errors each endpoint can return, what they mean, and how to handle them. Use it to build robust error handling and know when a retry will help.

Error response format

Errors return a JSON body with an error message. Some responses include extra fields:

{
  "error": "Human-readable message",
  "twitter_error_code": 187,
  "challenge": "rate_limited",
  "retry_after": 120
}
  • error — always present. A readable description of what went wrong.
  • twitter_error_code — present when the failure came from X directly.
  • challenge — login only. A stable, machine-readable key (rate_limited, locked, verification_required, totp_required).
  • retry_after — present on some rate-limit responses; seconds to wait.

Common errors (all endpoints)

These can appear on any request.

StatusMessageWhat it meansWhat to do
401Invalid or missing API keyYour API key is missing or wrongCheck your Authorization: Bearer <key> header
400Missing required … param: <x>A required field/parameter is missing or invalidFix the request
429Rate limit exceeded. Please try again later.You're sending requests faster than allowedWait retry_after seconds, then retry
500Internal server errorA temporary error occurredRetry shortly

Two kinds of 401. A 401 at the API level means your API key is wrong. On write endpoints (posting, liking, profile updates), a 401 can also mean the auth_token you supplied is invalid or expired — the message will say Invalid auth_token or Could not authenticate you. Re-mint the token in that case.

HTTP status codes

StatusMeaning
200Success
202Accepted — the action is queued/pending (e.g. a community post awaiting moderation)
400Bad request — missing/invalid parameters, invalid proxy URL, or media too large
401Unauthorized — bad API key or invalid/expired auth_token
403Forbidden — suspended/locked account, a permission restriction, or a Premium-only action
404Not found — the user, tweet, or resource doesn't exist or is protected
409Conflict — duplicate tweet
410Gone — the account is suspended
422The login couldn't be completed (retry usually helps)
423Locked — the account is locked or needs a verification step
429Too many requests — a rate limit was hit
500 / 502 / 503Temporary server or upstream error — retry

Twitter error codes

When a failure comes from X, we pass through X's own code as twitter_error_code.

CodeMeaningWhat to do
32Could not authenticate youauth_token is invalid/expired — re-mint it
63The target account is suspendedNothing — the account is gone
64Your account is suspendedUse a different account
131Temporary X internal errorRetry
139Already likedAlready done — safe to ignore
144No tweet found with that IDThe tweet was deleted or the ID is wrong
187Duplicate tweetChange the text or wait ~15 minutes
226Request looked automatedRetry
326Account temporarily lockedUnlock at x.com/account/access, then retry
327Already retweetedAlready done — safe to ignore
344Daily tweet limit reachedWait 24 hours
349Cannot message this userThe recipient doesn't accept your DMs
399Wrong password / couldn't log inCheck credentials, or retry (temporary login limit)
433Reply restricted / Premium requiredThe tweet is reply-gated, or the action needs X Premium
465Cannot retweet an outdated tweetThe tweet is too old to retweet
476Not allowed to send message requestsThe account can't send DM requests

Posting & engagement

Create Tweet

POST /twitter/tweet/create

StatusCodeMessageWhat to do
409187Status is a duplicate.Change the text or wait ~15 min
403433The original Tweet author restricted who can reply…The tweet doesn't allow your reply
403433Long-form / long-video needs PremiumUse a Premium account or shorten the content
403Not a member of the communityJoin the community first
429344Daily tweet limitWait 24 hours
400File size exceeds…Reduce the media file size
202pending_moderation: trueNot an error — the community post is awaiting review
503226This request looks automatedRetry
502 / 503Temporary connection errorRetry (if you supplied a proxy, confirm it's working)

Favorite / Retweet / Bookmark

POST /twitter/tweet/favorite · /twitter/tweet/retweet · /twitter/tweet/bookmark · /twitter/tweet/unbookmark

StatusCodeMessageWhat to do
403User is suspended, deactivated or offboardedThe account you're using is dead — switch accounts
40132Could not authenticate youauth_token invalid/expired — re-mint
403465not permitted to retweet an outdated TweetThe tweet is too old to retweet
200139 / 327already liked / already retweetedAlready done — safe to ignore
429Rate limitSlow down, then retry
502 / 503Temporary connection errorRetry

Delete Tweet

POST /twitter/tweet/delete

StatusMessageWhat to do
404No status found with that IDAlready deleted or wrong ID
403Not the authorYou can only delete your own tweets
401Invalid auth_tokenRe-mint the token

Follow / Unfollow

POST /twitter/user/follow · /twitter/user/unfollow

StatusMessageWhat to do
404User not foundCheck the handle/ID
403RestrictedThe account or target doesn't allow it
401Invalid auth_tokenRe-mint the token
429Follow limitWait, then retry

Update Profile / Avatar / Banner

POST /twitter/user/update_profile · /twitter/user/update_avatar · /twitter/user/update_banner

StatusMessageWhat to do
401Invalid auth_token - could not fetch credentialsRe-mint the token
400Image too large / bad formatFix the image

Join Community

POST /twitter/community/join

StatusMessageWhat to do
429You have already joined several Communities…Try again later
400Invalid communityCheck the community ID
403RestrictedThe account can't join

Login

POST /twitter/user_login

The challenge field is a stable key you can branch on programmatically.

StatuschallengeMessageWhat to do
429rate_limitedLogin temporarily limited by Twitter (rate limit). Try again later.Wait ~30 min, or retry with a higher-quality proxy
401Wrong passwordCheck the credentials
401totp_requiredTwo-factor authentication is enabled — provide totp_secretInclude the account's totp_secret
404Username not foundCheck the handle
410Account suspendedThe account is gone
423lockedAccount locked — unlock at x.com/account/access, then retry.Unlock the account, then retry
423verification_requiredVerification required: Twitter is asking to verify this login.Log into the account manually once to clear it
423email_codeVerification required: Twitter wants a code sent to the account's email.Complete the email verification manually
502proxy_unreachableThe login proxy did not respond…Try a different proxy, or omit proxy
400Invalid proxy URL.Fix the proxy value
422Login did not complete. Try again.Retry — this usually succeeds on a second attempt
503Login service is temporarily unavailable. Try again shortly.Retry shortly

Most common: 429 rate_limited (the login IP was throttled — retry with a cleaner proxy or after a short wait) and 422 (retry usually clears it). If you supply your own proxy, a high-quality residential or mobile IP gives the best login success rate.

Media Upload

POST /twitter/media/upload

StatusMessageWhat to do
400File size exceeds…Reduce the file size
400Unsupported typeUse a supported format
401Invalid auth_tokenRe-mint the token
502Temporary upload errorRetry

Limits: images (PNG / JPG / GIF / WEBP) up to 5 MB · animated GIF up to 15 MB · video (MP4) up to 512 MB.

Direct Messages

POST /twitter/dm/send · /twitter/dm/list · /twitter/dm/conversation

StatusCodeMessageWhat to do
429You've hit your daily message request limit. Subscribe to Premium for higher limits.Wait 24h, or use a Premium account
403476Sender is not verified to send message requestsThe account can't send DM requests
403349Cannot send messages to this userThe recipient doesn't accept your DMs
40132Could not authenticate youRe-mint the token
404Conversation / user not foundCheck the recipient

Reading data

GET /twitter/tweet/detail · /twitter/user/tweets · /twitter/user/info · /twitter/user/followers · /twitter/user/following · /twitter/tweet/thread · /twitter/tweet/replies · /twitter/user/search · and all other read endpoints

StatusMessageWhat to do
404Tweet not found: <id>The tweet was deleted, is protected, or the ID is wrong
404Could not resolve userId for @<handle>The handle doesn't exist, was renamed, or is suspended
404Could not find user with ID: <id>Check the user ID
400Missing required query param: <x>Provide the required parameter
429Rate limitWait retry_after, then retry

Region-restricted content. If a tweet shows "Due to local regulations, this content is restricted on X" in your browser, that's a regional block on your location, not an API error — the API can still return it. If you route the request through your own proxy that exits in the restricted country, the same regional block applies. Use no proxy, or a proxy in an unrestricted region.

Spaces

GET /twitter/spaces/info · POST /twitter/spaces/download

StatusMessageWhat to do
404Space not foundUse the Space URL (not a tweet URL); the Space may have expired
400Missing space_urlProvide the Space URL
200"downloadable": falseNot an error — this Space has no downloadable audio

Articles

GET /twitter/article/get · POST /twitter/article/create|update|publish|unpublish|delete|list

StatusMessageWhat to do
403Premium requiredArticles require an X Premium account
404Article not foundCheck the article ID
401Invalid auth_tokenRe-mint the token
400Invalid contentFix the article body

Retry guide

You see…Retry?Notes
429✅ after retry_after / short waitYou hit a rate limit
422 (login)Usually succeeds on the next attempt
500 / 502 / 503Temporary — retry shortly
226Retry
401Fix your API key or re-mint the auth_token
403 (suspended/locked)Use a different account, or unlock it first
404Check the ID/handle
400 / 409Fix the request (params, media size, duplicate text)

Tip: Build retry-with-backoff for 429, 422 (login), and 5xx. For 401/403/404/400, don't retry — fix the input or the account first.

On this page