> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twitterapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Login Step 2: by 2fa code

> Deprecated soon. Please use login V2 instead, as it is more stable.Login Step 2: by 2fa code.Trial operation price: $0.003 per call. 



## OpenAPI

````yaml POST /twitter/login_by_2fa
openapi: 3.0.1
info:
  title: TwitterAPI.io the most stable/fastest/cheapest twitter api.
  description: Provide the most stable/fastest/cheapest twitter api.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.twitterapi.io
security:
  - ApiKeyAuth: []
paths:
  /twitter/login_by_2fa:
    post:
      description: >-
        Deprecated soon. Please use login V2 instead, as it is more stable.Login
        Step 2: by 2fa code.Trial operation price: $0.003 per call. 
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - login_data
                - 2fa_code
                - proxy
              properties:
                login_data:
                  type: string
                  description: >-
                    The login data returned by
                    /twitter/login_by_email_or_username
                2fa_code:
                  type: string
                  description: >-
                    The 2fa code of the user. get 2fa code from
                    https://2fa.fb.rip/
                proxy:
                  type: string
                  description: >-
                    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
      responses:
        '200':
          description: Login Step 2(2fa) response
          content:
            application/json:
              schema:
                type: object
                properties:
                  session:
                    type: string
                    description: >-
                      The session of the login.Use this session to call other
                      endpoints.eg. /twitter/create_tweet /twitter/like_tweet
                  status:
                    type: string
                    description: Status of the request.success or error
                  msg:
                    type: string
                    description: Message of the request.error message
                  user:
                    type: object
                    description: The user info of the login.
                    properties:
                      id_str:
                        type: string
                        description: The id of the user
                      screen_name:
                        type: string
                        description: The screen name of the user
                      name:
                        type: string
                        description: The name of the user
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.