---
title: "Twitter/X"
description: "What to know when posting to Twitter/X through Octopost"
---

# Twitter/X

Twitter supports text, images, video, threads, and polls. When you include
`"twitter"` in your `platforms` array, Octopost handles OAuth, media uploads,
thread chaining, and token refresh automatically — you just send us your content.

## Content Limits

These are the constraints Twitter enforces on content. Octopost validates
before publishing and returns clear errors if anything doesn't fit.

| | Limit |
|---|---|
| Text | 280 characters (25,000 for X Premium accounts) |
| Images | Up to 4 per post · JPEG, PNG, GIF, WEBP · 5 MB each (16 MB for GIFs) |
| Video | 1 per post · MP4 only · 512 MB max · 140 sec (standard) / 4 hr (premium) |
| Polls | 2–4 options · 25 chars per option · 5 min to 7 day duration |

**Good to know:**
- You **can't mix video with images** or video with polls in a single tweet.
  Octopost will return a validation error if you try.
- URLs always count as **23 characters** on Twitter regardless of actual length.
  Keep this in mind when composing near the character limit.
- Octopost doesn't currently detect X Premium status. If you send >280
  characters for a standard account, Twitter will reject it and we'll
  report the failure in the post result.

## Threads

Send an array of content and Octopost chains them as a Twitter thread
automatically — no need to manage reply IDs yourself.

```json
{
  "thread": [
    { "content": "First tweet" },
    { "content": "Second tweet" },
    { "content": "Third tweet" }
  ],
  "platforms": ["twitter"]
}
```

If any tweet in the chain fails (e.g., rate limit hit), Octopost stops
there and reports which tweets succeeded and which didn't.

## Rate Limits

Twitter limits posting to **300 tweets per 3 hours** (app-level) and
**1,500 per day** (per user). Octopost tracks these limits and will
report a rate limit error rather than silently failing. If you're
scheduling posts, the scheduler respects these limits automatically.

## Things Octopost Handles for You

You don't need to worry about any of this — but in case you're curious:

- **OAuth 2.0 with PKCE** — Twitter's mandatory auth flow. Octopost
  manages the full handshake when users connect their accounts.
- **Token refresh** — Access tokens expire every 2 hours. Octopost
  refreshes them automatically.
- **Chunked video upload** — Videos go through a multi-step
  INIT/APPEND/FINALIZE flow. You just send us a video URL.
- **Media upload sequencing** — Twitter requires uploading media
  separately before attaching to a tweet. Octopost handles this.
- **Thread chaining** — Each reply needs the previous tweet's ID.
  Octopost manages the chain.

## Example

```json
{
  "content": "Hello from Octopost!",
  "platforms": ["twitter"],
  "media": {
    "images": ["https://example.com/photo.jpg"]
  }
}
```

That's it. Octopost takes care of the rest.
