TwitterAPIs Docs
API ReferenceAccount Session

X Session API | Bring Your Own Cookies or Mint One

Account Session: Bring your own X session cookies (recommended), or mint a session from a username and password, so write actions and private-data reads act as your account. Free.

Bring your own X session cookies (recommended), or mint a session from a username and password, so write actions and private-data reads act as your account. Free.

This category has 4 endpoints. Each is a pay-per-call REST endpoint with bearer auth, JSON in and out.

MethodPathCostDescription
POST/customer/sessionFreeRegister your auth_token and ct0 cookies once so every write and private read acts as your account, or pass them per call as x-auth-token / x-ct0 headers.
POST/customer/session/deleteFreeDelete the auth_token and ct0 you registered, so we no longer hold your X session cookies. Self-serve, idempotent, and free.
GET/customer/session/statusFreeRead back the session you registered: which X account it resolved to, whether it is still alive, and whether the proxy you supplied is the one your writes leave from. Free.
POST/user/user_login$0.0100Log in to X with a username and password (plus TOTP for 2FA) and store the resulting session against your API key, so authenticated-account reads and write tools then act as that account. A convenience alternative to bringing your own cookies via Register Session.