POST
/
twitter
/
login_by_2fa
cURL
curl --request POST \
  --url https://api.twitterapi.io/twitter/login_by_2fa \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "login_data": "<string>",
  "2fa_code": "<string>",
  "proxy": "<string>"
}'
{
  "session": "<string>",
  "status": "<string>",
  "msg": "<string>",
  "user": {
    "id_str": "<string>",
    "screen_name": "<string>",
    "name": "<string>"
  }
}

Authorizations

X-API-Key
string
header
required

Body

application/json
login_data
string
required

The login data returned by /twitter/login_by_email_or_username

2fa_code
string
required

The 2fa code of the user. get 2fa code from https://2fa.fb.rip/

proxy
string
required

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

Response

Login Step 2(2fa) response

session
string

The session of the login.Use this session to call other endpoints.eg. /twitter/create_tweet /twitter/like_tweet

status
string

Status of the request.success or error

msg
string

Message of the request.error message

user
object

The user info of the login.