This morning my weekly long post on X failed with this:
403 { "detail" : "This account cannot create Posts longer than 280 characters. Shorten the text, or subscribe to X Premium to create longer Posts. A link counts as 23 characters and an emoji as 2." , "status" : 403 , "title" : "Forbidden" }
Enter fullscreen mode
Exit fullscreen mode
The text was 1,931 characters, and the account has no Premium subscription. The API said so in the clearest way it could, with 403, not 400 .
That status code is the interesting part. A naive fallback looks like if r.status_code == 403: post_as_thread() . But 403 is also what you get for a suspended app, missing write permission or a duplicate post. Retrying all of those as a thread would post 11 replies into the void, or hide the real problem. So the fallback has to be specific.
Disclosure: I run small data pipelines and AI-agent automations, including the X account this is from.…