Skip to main content
POST
cURL
Log in directly using your email, username, password, and 2FA secret key. And obtain the login_cookies, to post tweets, etc. Please note that the login_cookies obtained through login_v2 can only be used for APIs with the “v2” suffix, such as create_tweet_v2. Price: 10,000 credits ($0.10 per call). We highly recommend enabling 2FA for your login – otherwise, the login_cookies you obtain may be faulty, preventing you from posting tweets.

Authorizations

X-API-Key
string
header
required

Body

application/json
user_name
string
required

User name.Must be set

email
string
required

Email.Must be set

password
string
required

The password of the user

proxy
string
required

The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port [blocked] . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504

totp_secret
string

TOTP/2FA secret (base32 seed, not a 6-digit code). Optional, but strongly recommended — accounts without 2FA may yield a login_cookie that gets flagged and can't post. To obtain: on X, enable 2FA, choose "can't scan the QR code", and X shows a 10+ character string — that's the TOTP secret.

Response

Login response

login_cookies
string

The login cookie of the user.Use this cookie to post tweets, etc.You can only call v2 APIs with this cookie.If your account is in good standing and you're using residential proxies, the cookies will generally remain valid indefinitely.

status
string

Status of the request.success or error

message
string

Message of the request.error message