Account Session

Register Session

Register your X session cookies so write actions (like, retweet, bookmark, follow, create or delete a tweet) and private-data reads (home timeline, bookmarks, likes, DMs, followers-you-know) run as your account. Supply auth_token and ct0 once; the session is stored against your API key and applied automatically. This call is free. Cost: Free per call.

post/customer/session

Request

  • Base URL: https://api.twitterapis.com/twitter
  • URL: https://api.twitterapis.com/twitter/customer/session
  • Auth: HTTP bearer

Request body

auth_tokenstring required

The auth_token cookie value from a logged-in x.com browser session.

ct0string required

The ct0 CSRF cookie value from the same x.com browser session.

user_agentstring

Browser user-agent to send with session requests. Defaults to a current Chrome UA if omitted.

proxy_urlstring

HTTP or SOCKS proxy URL the session egresses through, for example http://user:pass@host:port. This is a property of the session, so every call made with this API key on this session uses it, reads as well as writes. Defaults to direct, which means we choose the egress.

Response

Register 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.

okboolean

True when the session is stored.

messagestring

Human-readable confirmation.

usernamestring nullable

The X handle resolved from the session, or null when it could not be resolved.

Changes

No recorded changes to this operation across all 1 revision of this API.