X (formerly Twitter) exposes the X API v2. Posting requires OAuth 2.0 with the tweet.write scope and, depending on volume, a paid API tier. You authenticate each account, then create posts (text, with optional media).
PostWire will manage the OAuth, token refresh and posting so you publish to X the same way you publish everywhere else — one call.
PostWire's Smart Distribute turns a single prompt (plus optional media) into the best native post for every network — never the same text everywhere, which every algorithm penalizes. For X it writes thread-friendly text within the character limit and puts the link in a reply (so reach isn't throttled for an outbound link), while it simultaneously reframes the same idea for TikTok, YouTube, LinkedIn and the rest. AI generation is included free on every plan (you pay for brands, not per post) and is one MCP tool (generate_posts) or one REST call (POST /api/generate).
PostWire's X integration — OAuth2 (PKCE) connect, REST endpoint and MCP tool — is fully built. Activating it requires a paid X API tier (X charges for write access), so X turns on once that's in place; it's a one-word change in your platforms array, no new SDK. Bluesky, Telegram, Mastodon and Discord are live today and YouTube is rolling out — create your free account and start posting now.
X (Twitter) uses OAuth, not a password. Your user connects in the dashboard, or you generate the authorization URL via the API:
curl -X POST https://postwire.io/api/oauth/x/url \
-H "Authorization: Bearer $POSTWIRE_API_KEY"
# -> { "url": "https://.../oauth/authorize?..." }
# The user opens the URL, approves, and PostWire stores the token (and refreshes it for you).
Once connected, posting is a single request. Add more networks by putting more strings in platforms.
curl -X POST https://postwire.io/api/post \
-H "Authorization: Bearer $POSTWIRE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"platforms":["x"],"text":"Shipping PostWire today 🚀"}'
PostWire ships a first-class MCP server — not docs-only. Add it to any MCP client:
{
"mcpServers": {
"postwire": {
"command": "npx",
"args": ["-y", "postwire-mcp"],
"env": { "POSTWIRE_API_KEY": "pw_live_xxx" }
}
}
}
Then the agent just calls the tool:
{
"name": "post_to_social",
"arguments": { "platforms": ["x"], "text": "Shipping PostWire today 🚀" }
}
| Direct integration | PostWire | |
|---|---|---|
| Platform audit / review | You apply & maintain it | Handled for you |
| OAuth + token refresh | You build it | Managed |
| AI agent support | Build your own tool | MCP tool out of the box |
| Other networks | One integration each | 9 networks, one API |
| Plan | Price | Brands |
|---|---|---|
| Free | $0 | 1 brand · 30 posts/mo |
| Starter | $9 | 3 brands · 300/mo |
| Pro | $29 | 10 brands · 2,000/mo |
| Agency | $99 | 50 brands |
| Scale | $299 | 200 brands |
Running 50 brands on Ayrshare costs roughly $779 — and its MCP is docs-only, so an agent can't actually post. See PostWire vs Ayrshare.
Get your API key — free →