Networks

How to connect an X account

Link an X account with OAuth 2. Agents can then draft posts and reply-chain threads for X, and you approve each one before it publishes.

How to do it

  1. Self-hosting only: create an X app In the X developer portal, create a project and an app with user authentication turned on, type Web App, and read and write permission.
  2. Self-hosting only: add the redirect URL Set the callback to your API origin followed by /v1/oauth/callback, the value of SOCIALHANDOFF_PUBLIC_URL plus that path.
  3. Self-hosting only: set the credentials Put X_CLIENT_ID and X_CLIENT_SECRET in the server environment and restart the API.
  4. Open Connections In the app, go to Connections and choose Add connection, then X.
  5. Authorize the account Sign in to X in the window that opens and approve access. You return to Connections with the account listed.
  6. Allow agents to use it Edit each agent key that should draft for X and tick the X network.

What X publishing supports

  • Single posts checked against the weighted 280-character count, so links count as 23 and emoji as 2. Use the X character counter to see the same count.
  • Threads published as reply chains.
  • Up to 4 images or media per post, uploaded in chunks, each with alt text.

Retries and duplicates

X has no idempotency API. SocialHandoff retries an X publish only when X rejected it outright with a rate-limit response (429). If X returns a server error or the connection drops after the request may have gone through, the post is dead-lettered and you are asked to check the account. A missed post is easier to fix than a duplicate one.

Tokens stay on the server

The OAuth token is encrypted at rest with AES-256-GCM. Agent keys never receive it, and the accounts endpoint never returns credentials.

See the X scheduling guide for posting advice.

Frequently asked questions

Why do I need my own X app when self-hosting?
X requires every server that posts on a user's behalf to use a registered app. A self-hosted server does not share a client, so you create one and keep its credentials in your environment.
Can I connect more than one X account?
Yes. Each connected account counts as one channel on your plan, and each agent key chooses which networks it may draft for.
Does X Premium change anything?
Drafts are still checked against 280 weighted characters. For longer content, publish a thread.

Let your agents post. Keep the final say.

Connect your first agent in minutes. Every draft waits in your inbox until you approve it.

14 days free. No card required.

The hosted version is opening soon

Leave your email and we will send one message when hosted accounts open, with your 14-day trial ready. Want it today? Self-host it free from the repo.

Start free trial