Overview
Connect X, capabilities, wallet billing rules, and known limits.
Schedule and automate X posts with text, images, videos, GIFs, threads, and quotes, plus engagement actions and normalized analytics. Everything runs through the X API v2 with OAuth 2.0.
Prepaid wallet required
X usage bills your Onepostly wallet at X list prices with no markup. An empty balance rejects requests with 402 INSUFFICIENT_WALLET. Top up in Dashboard → Settings → Billing.
| Page | Topics |
|---|---|
| Posts | Text, images, video, GIFs, threads, quotes. Schedule, remote delete |
| Engagement | Likes, retweets, bookmarks, replies |
| Analytics | Metrics for published posts |
Quick Reference
| Property | Value |
|---|---|
| Character limit | 280 weighted units per segment, or 25,000 on a paid X subscription |
| Images per post | 4 |
| GIFs per post | 1 (consumes all 4 image slots) |
| Videos per post | 1 |
| Image formats | JPEG, PNG, WebP, GIF |
| Image max size | 5 MB (images), 15 MB (GIFs) |
| Video formats | MP4, MOV, WebM |
| Video max size | 512 MB |
| Post types | Text, Image, Multi-image, Video, Thread |
| Scheduling | Yes, with IANA timezone |
| Editing published posts | No |
| Inbox (Comments) | Yes |
| Inbox (DMs) | No |
| Analytics | Yes |
Before You Start
X applies a 280 weighted-unit limit per post by default. Latin characters and line breaks weigh 1, CJK characters and emoji weigh 2, and every URL counts as a flat 23 regardless of actual length. X sets the limit from the connected account's own subscription, so a paid tier raises that account to 25,000 weighted units — long-form posts and replies included. GET /v1/connections reports the tier as xSubscriptionType. If you are cross-posting from platforms with higher limits, shorten the text or the request is rejected before it reaches X.
Additional requirements:
- X rejects duplicate posts. Identical or near-identical content fails, even slightly rephrased
- Attach per-reply media with
threadItems(1 to 25 replies under the root post with per-reply text and media) - A video cannot be combined with other media. One attachment per video post
- GIFs send through
mediaKind: "video"with a.gifURL. A GIF consumes the whole media budget - Every publish, reply, quote, like, bookmark, and delete bills the wallet at X list prices
Connect
const { connections: list } = await connections.listConnections();
const x = list.find((c) => c.platform === "x");
// x.id is your accountIdIf a permitted action returns a permission error, reconnect X once to refresh the connection's scopes.
OAuth Scopes
| Scope | What it enables |
|---|---|
tweet.read | Read posts for replies, retweeters, and analytics |
tweet.write | Publish, reply, quote, delete |
users.read | Account identity (id, username, avatar, subscription tier) |
media.write | Upload images, GIFs, and videos |
like.read / like.write | Like and unlike posts |
bookmark.read / bookmark.write | Bookmark and remove bookmarks |
offline.access | Refresh tokens for long-lived connections |
Token Lifetime
| Token | Lifetime | Behavior |
|---|---|---|
| Access token | ~2 hours | Refreshed automatically by Onepostly |
| Refresh token | Rotated on every refresh | After revocation or password change, reconnect the account |
Billing Rules
- Publishing, replying, quoting, liking, bookmarking, deleting, and analytics reads all debit the wallet
- A thread costs the sum of its segments. Each segment bills separately
- Deleting a thread bills per deleted tweet
- Failed platform calls are refunded automatically
X_OUT_OF_CREDITSmeans the underlying X developer account has no credits left, not the Onepostly wallet. Contact support
Capabilities
| Action | Supported | Notes |
|---|---|---|
| Text post | Yes | Max 280 weighted units per segment, or 25,000 on a paid X subscription |
| Image / multi-image | Yes | Up to 4 images per post, 5 MB each |
| Video | Yes | One video per post, up to 512 MB |
| GIF | Yes | Send the GIF URL with mediaKind: "video", up to 15 MB |
| Thread (reply chain) | Yes | Root post plus 1 to 25 replies via threadItems with per-reply media |
| Media geo restriction | Yes | geoRestriction allowlist (max 25). Media-only. Text-only tweets ignore it |
| Quote | Yes | On create, or from a published post |
| Schedule | Yes | Cancel any time before it publishes |
| Remote delete | Yes | Deletes the full thread when present |
| Replies | Yes | List, create, delete your own replies |
| Retweet / like / bookmark | Yes | Create and remove |
| Analytics | Yes | Normalized metrics |
| Stories | No | Not an X feature |
What You Can't Do
These features are not available through Onepostly's X integration:
- Stories
- Polls
- Paid partnership, AI-generated, or sensitive media labels
- Editing published tweets
- Sending or reading DMs
- Replying settings (who can reply)