Quick reference
Connect an account
POST /v1/accounts/connect/twitter. OAuth 2.0 PKCE. letmepost signs a state token carrying the PKCE code_verifier through the redirect so the dashboard never stashes it client-side. After the X callback, the code+verifier exchange runs server-side.
Scopes
like.read, follows.read — off by default; not needed for publishing.
Token lifecycle
X access tokens are short-lived (~2 hours);offline.access mints a refresh token that lets the publisher refresh on schedule. If a user revokes app access from X’s settings the next call surfaces platform_auth_failed.
Post types
Text post
text.json
Single image
single-image.json
Multi-image (up to 4)
multi-image.json
Single video
Chunked upload runs transparently — small clips return immediately, larger ones runINIT → APPEND → FINALIZE → STATUS until X reports succeeded.
video.json
Reply (and threads)
Threads on X are reply chains — pass the previous tweet id on each follow-up. The first tweet in a thread is just a normal post; the second carriesreplyToTweetId set to the first’s id, the third to the second’s, and so on.
reply.json
Quote tweet
Mutually exclusive withreplyToTweetId — preflight rejects setting both, since X itself does.
quote.json
Wisdom (platform-specific things that bite)
Common errors
What you can’t do (yet)
- Polls.
- Long-form (premium) tweets above 280 graphemes — the preflight cap is wired for the standard limit; long-form support lands in a follow-up slice.
- Reading replies, likes, or retweet metadata.
- DMs.
- Lists (creating tweets that target a list audience).
- Spaces.
API reference
POST /v1/posts— primary publish.POST /v1/media— upload images/videos formediaIdreferences.POST /v1/accounts/connect/twitter— start a Twitter OAuth flow.

