Skip to main content

Account Connect

Account Connect

To use write operations (create tweets, reply, quote), you must first connect your X account. XCROP supports two connection methods: choose whichever you prefer. A residential proxy is required for all write operations.

⚠
Proxy Required: You must provide a residential proxy URL when connecting your account. All write operations are routed through your proxy to protect your account from detection. Format: http://user:pass@host:port or socks5://user:pass@host:port. The proxy is validated for liveness before the connection is accepted.
ℹ
Method 1 (Credentials): Provide your email + password (+ optional 2FA secret). XCROP logs in on your behalf and auto-refreshes sessions when they expire.

Method 2 (Cookies): Provide your auth_token and ct0 cookies from your browser. No password needed. When cookies expire, you'll need to provide new ones.
ℹ
All data (credentials, cookies, and proxy URL) is encrypted with AES-256-GCM at rest. You can disconnect at any time to permanently delete all stored data.
POST/v2/account/connectConnect your X account using either credentials or browser cookies.

Method 1: Credentials

ParameterTypeRequiredDefaultDescription
emailstringrequired—Your X login email address
passwordstringrequired—Your X password
proxystringrequired—Residential proxy URL (http:// or socks5://)
totp_secretstringoptional—Your 2FA TOTP secret (base32). Required if 2FA is enabled.
BASH
curl -X POST https://xcrop.io/api/v2/account/connect \
  -H "Authorization: Bearer $XCROP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "your_password",
    "proxy": "http://user:[email protected]:8080",
    "totp_secret": "JBSWY3DPEHPK3PXP"
  }'

Method 2: Browser Cookies

ParameterTypeRequiredDefaultDescription
auth_tokenstringrequired—Your auth_token cookie from x.com (40-char hex)
ct0stringrequired—Your ct0 CSRF cookie from x.com (160-char hex)
proxystringrequired—Residential proxy URL (http:// or socks5://)
BASH
curl -X POST https://xcrop.io/api/v2/account/connect \
  -H "Authorization: Bearer $XCROP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "auth_token": "abc123def456...",
    "ct0": "a1b2c3d4e5f6...",
    "proxy": "http://user:[email protected]:8080"
  }'
✦
To get your cookies: Open x.com → DevTools (F12) → Application → Cookies → auth_token and ct0. Copy their values.

Response

200 OKJSON
{
  "success": true,
  "data": {
    "method": "cookies",
    "username": "your_username",
    "proxy_status": "active",
    "connected_at": "2026-03-04T10:00:00Z"
  }
}
GET/v2/account/statusCheck if your X account is connected and active.
BASH
curl https://xcrop.io/api/v2/account/status \
  -H "Authorization: Bearer $XCROP_API_KEY"
ResponseJSON
{
  "connected": true,
  "data": {
    "method": "cookies",
    "username": "your_username",
    "is_active": true,
    "proxy_configured": true,
    "last_login_at": "2026-03-04T10:00:00Z",
    "connected_at": "2026-03-04T10:00:00Z"
  }
}
DELETE/v2/account/disconnectDisconnect your X account and remove all stored credentials.
BASH
curl -X DELETE https://xcrop.io/api/v2/account/disconnect \
  -H "Authorization: Bearer $XCROP_API_KEY"
ResponseJSON
{
  "success": true,
  "message": "X account disconnected and credentials removed"
}
ℹ
When you disconnect, all stored data is permanently deleted. Credential-based connections auto-refresh expired sessions. Cookie-based connections require you to provide new cookies when they expire (~1 year lifespan).

More in Write API

Full documentation with search: xcrop.io/docs