Skip to main content
POST https://xquik.com/api/v1/x/accounts/{id}/reauth
Free. This endpoint does not consume credits.
This takes a dashboard session, or a key with the Connect X accounts permission. Turn it on at dashboard.xquik.com/api-keys. Full access doesn’t include it. A key without it gets 403 x_account_connect_permission_required. OAuth tokens and MCP tools get 403 session_required. With a key, your backend receives the new X password. Read your duties first.
Use this when an account session expires or X requires re-verification.
Omit 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.
Send totp_secret only when the saved key no longer works.
cURL

Path parameters

Headers

Body

2FA re-authentication

Xquik reuses the saved TOTP secret by default. Send totp_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, reset the authenticator app setup before re-authenticating. Do the same if X rejects the current one.

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.
  1. Open X Settings and Privacy > Security and Account Access > Security.
  2. Open Two-Step Verification > Authentication App.
  3. Turn Authentication App off, then turn it on again.
  4. X shows a QR code. Then choose Can’t scan the QR code? to reveal the text secret.
  5. Copy the long secret key. Then store it in a password manager before leaving the setup screen.
  6. Add that key to your authenticator app if you are setting it up fresh.
  7. Finish enabling 2FA on X by entering the current 6-digit code. The code comes from your authenticator app.
  8. Send the new long key in totp_secret when you call Xquik.
Finish the X-side 2FA confirmation after copying the secret key. If you abandon setup before confirmation, re-authentication cannot use that key.
See 2FA secret key setup for the full connection checklist.

Response

200 OK

400 Invalid input

{ "error": "invalid_input", "message": "Missing required password field" } Missing password field or invalid format. { "error": "invalid_id", "message": "Invalid account ID format" } The provided account ID is not a valid format.

401 Unauthenticated

{ "error": "unauthenticated", "message": "Missing or invalid API key" } Missing or invalid API key.

202 Sign-in continues

A key’s sign-in past 75 seconds answers pending with a Location status URL. Wait for Retry-After, then call Get X Account Connection Status. X may also ask for an email code, which answers requires_email_code. Send it to Submit Email Code.

404 Not found

No account exists with this ID, or it belongs to a different Xquik account.

409 Another X account

{ "error": "x_account_mismatch", "message": "This sign-in belongs to a different X account. Connect it as a new account instead." } The stored login stays as it was.

429 Login cooldown

{ "error": "login_cooldown", "message": "Login is temporarily paused", "reason": "automated", "retryAfterMs": 3600000 } A prior login attempt triggered a cooldown (for example, X flagged the session). Wait for retryAfterMs before retrying. The response includes a Retry-After header in seconds.

429 Rate limited

{ "error": "rate_limit_exceeded", "message": "Connection safety limit reached. Try again later.", "retryAfter": 900 } You sent too many failed logins in 15 minutes. The limit counts this caller or this X account. Wait the Retry-After seconds, then try once. Each account a caller connects raises its limit. See the rate limits guide for details.

422 Login failed

X rejected the submitted password or TOTP secret. Retry with the current password and the saved Authenticator App secret key. Use the key, not a 6-digit code. { "error": "passkey_required", "message": "X asked this account to sign in with a passkey. Delete the passkey in X's security settings, keep Authentication app 2FA, then try again." } X showed this account a passkey sign-in, which Xquik can’t complete. Open X Settings and Privacy > Security and Account Access > Security > Passkey. Delete the passkey but keep Authenticator App 2FA on, then re-authenticate.

503 Service unavailable

{ "error": "service_unavailable", "message": "Service temporarily unavailable. Try again." } The X re-authentication service is temporarily unavailable. Retry after a short delay.
Related.

Response examples

202 example

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }
  • 403 { "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }
  • 404 { "error": "account_not_found", "message": "X account not found." }
  • 409 { "error": "x_account_mismatch", "message": "This sign-in belongs to a different X account. Connect it as a new account instead." }
  • 422 { "error": "login_failed", "message": "Login failed. Check credentials and try again." }
  • 429 { "error": "rate_limit_exceeded", "message": "Too many requests. Retry later." }
  • 503 { "error": "service_unavailable", "message": "Service temporarily unavailable. Try again later." }