---
title: "POST /twitter/login_by_email_or_username"
method: POST
path: "/twitter/login_by_email_or_username"
---

# POST /twitter/login_by_email_or_username

`POST /twitter/login_by_email_or_username`

## Request

- Base URL: `https://api.twitterapi.io`
- URL: `https://api.twitterapi.io/twitter/login_by_email_or_username`
- Auth: API key in header `X-API-Key`

Login Step 1: by email or username.Recommend to use email.Price: 300 credits ($0.003 per call). Please read the guide: https://twitterapi.io/blog/twitter-login-and-post-api-guide

## Request body

- object
  - `username_or_email` string, required: User name or email.If you can't log in with your email, use your username. If you can't log in with your username, use your email instead.ref:https://twitterapi.io/blog/twitter-login-and-post-api-guide
  - `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 . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504

## Response `200`

Login response

- object
  - `hint` string: Hint of the login.eg. "Please use second endpoint /login_2fa to continue login."
  - `login_data` string: Use this data to call /twitter/login_2fa to continue login.
  - `status` string: Status of the request.success or error
  - `msg` string: Message of the request.error message

## Other responses

- `400`: Unexpected error

## Changes

- **2026-11-03** `03599c7e3236`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/changes/twitter/login_by_email_or_username/post.md)

---

[API](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api.md) - [All operations](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/revisions/03599c7e3236?raw)
