Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.letmepost.dev/llms.txt

Use this file to discover all available pages before exploring further.

X (Twitter) v2 API via OAuth 2.0 with PKCE. v1 of the publisher targets single-image and single-video tweets; the 4-up surface ships in a follow-up slice.

Connect

POST /v1/accounts/connect/twitter. OAuth 2.0 PKCE. After complete we call GET /2/users/me to pin the user id.

Scopes

tweet.write    — create tweets
tweet.read     — required to mint the token
users.read     — required to mint the token
offline.access — required for refresh tokens
Extended: like.read, follows.read — off by default; not needed for publishing.

Token lifecycle

X access tokens are short-lived (~2 hours) but offline.access issues a refresh token that lets us refresh on schedule.

Posting

tweet.json
{
  "account": { "platform": "twitter", "id": "..." },
  "text": "shipped",
  "media": [{ "kind": "image", "mediaId": "med_…", "altText": "..." }]
}

Constraints

Preflight rules