X accounts
X account reauthentication API & login recovery
Restore a connected X account with its current password. Xquik reuses the saved Authenticator App TOTP secret unless you send a replacement. The call is free.
- 200
- 400
- 401
- 404
- 422
- 429
- 503
POST
X account reauthentication API & login recovery
Free. This endpoint does not consume credits.
Use this when an account session expires or X requires re-verification.
totp_secret to reuse the saved key. Send a replacement only if X
changed or rejected the saved key.
Re-authentication does not guarantee the same public IP. Xquik does not support custom,
dedicated, or user-supplied proxies.
Replace the saved TOTP secret
Replace the saved TOTP secret
Send
totp_secret only when the saved key no longer works.cURL
Path parameters
string
required
The unique account ID.
Headers
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.
string
required
Must be
application/json.Body
string
required
Current password for the X account.
string
Replacement Authenticator App TOTP secret. Omit it to reuse the saved key.
Send the base32 secret, not the 6-digit code.
string
Email for the X account. Updates the stored email during re-authentication.
2FA re-authentication
Xquik reuses the saved TOTP secret by default. Sendtotp_secret only when
replacing that key. Never send a 6-digit code, backup code, passkey, or security
key prompt.
If you never saved the secret key, or X rejects the current one, reset the authenticator app setup before re-authenticating:
Saved key still works
Omit
totp_secret. Xquik reuses the encrypted key saved during connection.Key is missing
X shows the text secret only during Authentication App setup. Turn Authentication App off, then on again. Copy the new key, then finish setup on X.
Key was rejected
Treat the old TOTP secret as stale. Reset Authentication App setup on X and save the new long key. Finish 2FA confirmation, then re-authenticate.
- Open X Settings and Privacy > Security and Account Access > Security.
- Open Two-Step Verification > Authentication App.
- Turn Authentication App off, then turn it on again.
- When the QR code appears, choose Can’t scan the QR code? to reveal the text secret.
- Copy the long secret key and store it in a password manager before leaving the setup screen.
- Add that key to your authenticator app if you are setting it up fresh.
- Finish enabling 2FA on X by entering the current 6-digit code from your authenticator app.
- Send the new long key in
totp_secretwhen you call Xquik.
See 2FA secret key setup for the full connection checklist.
Response
200 OK
string
Account ID.
string
X username.
string
X user ID.
string
Account status (for example
active).string
Derived login and cookie health. One of
healthy, locked, needsReauth, recovering, suspended, temporaryIssue. See Account health for meanings.string
ISO 8601 creation timestamp.
400 Invalid input
password field or invalid format.
401 Unauthenticated
404 Not found
429 Login cooldown
retryAfterMs before retrying. The response includes a Retry-After header in seconds.
429 Rate limited
Retry-After value before starting another re-authentication request.
422 Login failed
503 Service unavailable
Related. Get X Account to check account status, or Connect X Account if you need to add a new account instead.