Twitter / X
Post tweets, threads, polls, and media to Twitter/X via the PostPeer API.
Overview
Publish tweets, threads, polls, and rich media to Twitter/X through a single API endpoint. PostPeer handles OAuth, token refreshes, and rate limits.
Quick Start
1. Connect a Twitter Account
Response:
Redirect the user to the url. After authorization, the account is connected to your project.
2. Get the Account ID
Find the integration with "platform": "twitter" and note the id.
3. Post a Tweet
Response:
Features
Text Posts
Post a standard tweet with up to 280 characters.
Images & Videos
Attach media using the mediaItems array:
Supported media:
- Images: JPG, PNG, GIF, WebP (up to 4 per tweet)
- Videos: MP4 (1 per tweet)
- GIFs: animated GIF (1 per tweet)
Threads
Create multi-tweet threads using platformSpecificData.threadItems:
Polls
Create polls with 2-4 options:
Reply Settings
Control who can reply using platformSpecificData.replySettings:
"everyone"(default)"following""mentionedUsers"
Limits
| Limit | Value |
|---|---|
| Character limit | 280 per tweet |
| Images per tweet | 4 |
| Videos per tweet | 1 |
| Thread length | No hard limit |
| Poll options | 2-4 |