X (Twitter)
OmniPost publishes to X using API v2 with OAuth 2.0 Authorization Code + PKCE.
Scopes OmniPost requests
| Scope | Purpose |
|---|---|
| tweet.read | Read post status back for confirmation. |
| tweet.write | Create posts. |
| users.read | Resolve the connected account's username/profile for your dashboard. |
| offline.access | Issues a refresh token so OmniPost can keep the connection alive past the 2-hour access token lifetime without re-prompting the user. |
How OmniPost publishes
Text-only posts go straight to POST /2/tweets. Posts with media are uploaded first — simple upload for small images, chunked INIT/APPEND/FINALIZE for video and GIFs — then attached by ID: { "text": "...", "media": { "media_ids": [...] } }.
Media constraints
| Type | Formats | Limits |
|---|---|---|
| Image | JPEG, PNG, WebP, GIF | ≤5MB (GIF ≤15MB, ≤1280×1080, ≤350 frames). |
| Video | H.264 | ≤512MB. Duration 0.5–140 seconds via the API. Aspect ratio 1:3–3:1. |
| Per post | — | Up to 4 photos, OR 1 GIF, OR 1 video — never mixed types in one post. |
Quirks to design around
- 140-second video cap is a hard API ceiling — well below what the X app allows some accounts to upload manually. Videos over this fail the target with
unsupported_media_for_platform. - No mixing media types in one post — a request with both an image and a video for the X target is rejected.
- Refresh tokens rotate on each use when issued with
offline.access— OmniPost stores the newest one after every refresh automatically; you never see or handle this. - Usage-based pricing on X's side (per-request cost for post creation, higher for posts containing a URL) applies to X's own API billing on your developer app, independent of your OmniPost plan.
- Automated posting disclosure — X requires accounts used for automated/bot posting to enable the account's "Automated" label and disclose the operator; fully autonomous AI-generated replies require X's prior written approval. This is a policy obligation on the connected account, not something OmniPost enforces for you.
Rate limits
POST /2/tweets: 100 requests/15min per connected account, 10,000/24h across your whole app. Media upload (simple): 500/15min per account, 50,000/24h per app.
App review, in brief
As of the current X developer pricing model, there is no separate manual app-review gate for basic read/write access in the standard getting-started flow — access is governed by your usage-based billing tier on X's developer portal rather than a review queue. Confirm your current access tier at console.x.combefore switching workspace keys to live, since X's access model has changed more than the other three platforms' recently.
A sandbox key lets you finish and test your X integration without incurring any usage-based X API costs.