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
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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | required | — | Your X login email address | |
| password | string | required | — | Your X password |
| proxy | string | required | — | Residential proxy URL (http:// or socks5://) |
| totp_secret | string | optional | — | 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| auth_token | string | required | — | Your auth_token cookie from x.com (40-char hex) |
| ct0 | string | required | — | Your ct0 CSRF cookie from x.com (160-char hex) |
| proxy | string | required | — | 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).