Receive and reply to X comments

Bring eligible X public replies into UniPost as x_reply, list them through the unified Inbox, and respond with a durable idempotency key.

Basic plan or higherEligible summons onlyManaged or workspace X app

X comments use OAuth 2.0 and remain available independently. UniPost still enforces its internal inbound safety boundary.

Keep the workspace API key server-side and derive external_user_id from the authenticated app user. Use inbox_scope=workspace only for an owner/admin aggregate.

1. Verify account capability

Call Get account capabilities and require x_inbox.comments_enabled. For unipost_managed_app, UniPost operates the X app and managed reads, inbound events, and replies use the managed X connection. For workspace_x_app, your X app must have Client ID, Client Secret, app Bearer Token, and Consumer Secret configured; those operations use your X access.

Inbox is available on Basic and higher plans. If the API returns plan_feature_not_available, upgrade before retrying. If reconnect_required is true, follow the X reconnect guide.

2. List public replies

Filter the Inbox list reference by x_reply. A persisted X item includes its account, reply-tree keys, author, text, timestamp, and a permalink when X provides one.

3. Reply once

Use the Inbox reply reference. UniPost accepts a public X reply only when the inbound record proves that the author summoned the connected account. Always send a stable Idempotency-Key; retry an uncertain result with the same key and payload.

4. Run a bounded backfill

Use the Inbox sync reference for up to seven days of X replies. If the response has confirmation_required: true, repeat the exact account, lookback, maximum, and include fields with the returned confirmation token before it expires.

5. Handle allowance and cap boundaries

  • x_inbound_daily_cap_exceeded: inbound admission paused for the current UTC day; resume after reset or an administrator changes the cap.
  • x_write_outcome_pending: do not resend with a new key; poll or retry with the original key.
  • x_reconnect_required: reconnect with tweet.read, tweet.write, users.read, and offline.access.

Start from the Inbox API overview. Permission problems belong in the reconnect guide.