X API Error Codes: What They Mean and How to Fix Them
Last updated: May 1, 2026
When a tweet fails to post in OpenTweet, the dashboard shows an X API error code. This reference explains each code and how to fix it.
What are the most common X API error codes?
| Error Code | Meaning | How to Fix |
|---|---|---|
| 400 | Bad Request — malformed request (tweet too long, invalid characters) | Check tweet text length (280 char limit for standard accounts). Remove unsupported characters. |
| 401 | Unauthorized — OAuth token expired or revoked | Go to Settings → X Account → Reconnect. Complete the OAuth flow to get a fresh token. |
| 403 | Forbidden — account restricted, policy violation, or API tier limitation | Check if your X account is in good standing. Ensure tweet content complies with X's automation policies. |
| 187 | Duplicate status — identical tweet text posted recently | Modify the tweet text slightly. Even changing punctuation or adding an emoji makes it unique. |
| 226 | Account flagged as automated — X suspects spam behavior | Reduce posting frequency. Review your posting patterns. Contact X Support if the flag is incorrect. |
| 261 | Write actions revoked — X revoked the app's write access | Disconnect and reconnect your X account in Settings to run the OAuth flow and restore write access. |
| 429 | Too Many Requests — rate limit exceeded | OpenTweet auto-retries after the rate window resets (15 min for per-minute, midnight UTC for daily). |
How do I fix error 401?
Error 401 Unauthorized means your X OAuth token has expired or been revoked. This happens when you change your X password, revoke app access, or after a long period of inactivity. Fix: go to Settings → X Account → Reconnect. OpenTweet runs the OAuth flow and generates a fresh token. Retry failed tweets afterward.
How do I fix error 187?
Error 187 means X rejected your tweet as a duplicate. X's duplicate filter applies when tweet text is identical or near-identical to content posted within approximately the past 24-48 hours. Fix: modify the tweet text by changing a word, adjusting punctuation, or adding/removing an emoji. Even minor changes resolve the duplicate check.
How do I fix error 429?
Error 429 means you've hit X's rate limit. OpenTweet automatically retries rate-limited tweets after the window resets: 15 minutes for per-minute limits, midnight UTC for daily limits. To prevent recurring 429 errors, reduce your scheduled post frequency or upgrade your OpenTweet plan.