@kentcdodds/x
X API v2 helpers for tweets, search, legacy DMs, and encrypted X Chat via a Fly XDK sidecar.
- Integrations
- x
- social
- oauth
- posting
- search
- dm
- chat
- openapi
- multi-account
- Version
- 2.4.3
- License
- MIT
- Published
- September 11, 2026
- Pinned commit
79bc950- Rating
- No ratings yet
- Forks
- 2
- Adaptation effort
- —
README
Agent docs@kentcdodds/x
Intent
Headless X API v2 helpers for Kody agents: OpenAPI-scaffolded bearer-token
reads (xBearerToken), multi-account OAuth user-context requests via saved
x / x-* integrations, search/profile/tweet helpers with tweet shaping and
rate-limit notes, guarded social actions, legacy direct messages, and
on-demand encrypted X Chat (list threads, read a thread, send a message) via a
Fly XDK sidecar that unlocks the existing Chat identity with xChatPin. Not a
24/7 bot or Activity stream. Meant to be forked: call ./adapt to swap the
Fly sidecar, secrets, and OAuth account onto the forking user, then rewrite
this Intent and publish their copy.
What it does
- App-only bearer reads: username lookup, recent search, public user tweets
- Multi-account OAuth: authenticated profile, posts, likes, reposts, bookmarks, follows
- Legacy DMs: list events, read a conversation, send (guarded)
- Encrypted X Chat via Fly XDK sidecar: list inbox metadata, decrypt a thread, send ciphertext (guarded)
- Token refresh for a selected
x/x-*integration - Fork adapt guide and sidecar source for deploying your own Fly app
Prerequisites / setup
- Save user secret
xBearerToken(app-only bearer). Approve hostapi.x.comif prompted. - Connect OAuth integration
x(default). Optional accounts:x-<purpose>(for examplex-kodykoala). Reconnect athttps://kody.codes/connect/oauth?provider=xor...?provider=x-<purpose>. - For encrypted X Chat (needs OAuth
dm.read/dm.writeplus sidecar):- User secrets
xChatPin(existing x.com Chat PIN — never generate a new keypair) andxChatSidecarToken(shared bearer for your Fly sidecar) - Package storage
xChatSidecarUrl— your Fly origin (forks must set this; the listing default is the author’s sidecar) - Host-approve only your sidecar host on those secrets — not Juicebox
or
api.x.comfor the PIN
- User secrets
- Agents: see
AGENTS.mdfor import paths, smoke/dryRun snippets, and fork adapt steps.
Multi-account: omit account → integration x; account: 'kodykoala' →
x-kodykoala; or pass integration: 'x-kodykoala' exactly.
Done when
xBearerTokenis saved; OAuthx(and anyx-*) connected as needed- Bearer smoke returns
ok: true(HTTP 429 counts as auth-plumbing-verified) - Write helpers return dry-run unless
confirm: trueafter explicit approval - Chat (if used): sidecar URL stored, PIN/token secrets approved for your sidecar host only; list/get chat work without generating a new identity
Report this listing
Log in to report this listing.