Skip to main content
POST
/
x
/
accounts
/
{id}
/
reauth
Re-authenticate X account
curl --request POST \
  --url https://xquik.com/api/v1/x/accounts/{id}/reauth \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "password": "<string>",
  "totp_secret": "<string>",
  "email": "<string>",
  "proxy_country": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.xquik.com/llms.txt

Use this file to discover all available pages before exploring further.

Free - does not consume credits
Use this when an account session expires or X requires re-verification.
If this account uses Authenticator App 2FA, send the saved long key in totp_secret. If you never saved it or X rejects it, turn Authentication App off and on again in X to reveal a new text secret. Copy it, add it to your authenticator app, finish the 6-digit confirmation on X, then re-authenticate with that saved key.
curl -X POST https://xquik.com/api/v1/x/accounts/3/reauth \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "password": "s3cureP@ss",
    "totp_secret": "JBSWY3DPEHPK3PXP"
  }' | jq

Path parameters

id
string
required
The unique account ID.

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.
Content-Type
string
required
Must be application/json.

Body

password
string
required
Current password for the X account.
totp_secret
string
TOTP secret key if the account has 2FA enabled. This is the base32-encoded secret, not the 6-digit code.
email
string
Email for the X account. Updates the stored email during re-authentication.
proxy_country
string
Two-letter country code (ISO 3166-1 alpha-2) for the login proxy region. Example: US, GB.

2FA re-authentication

Use the long authenticator app secret key in totp_secret. Do not send the 6-digit authenticator code, a 12-character backup code, a passkey, or a 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

Send the saved base32 secret in totp_secret with the current password. Do not send the live 6-digit authenticator code.

Key is missing

X shows the text secret only during Authentication App setup. Turn Authentication App off, turn it 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, 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. When the QR code appears, choose Can’t scan the QR code? to reveal the text secret.
  5. Copy the long secret key and store it safely 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 from your authenticator app.
  8. Send the saved long key in totp_secret when you call Xquik.
Finish the X-side 2FA confirmation after copying the secret key. If setup is abandoned before confirmation, re-authentication cannot use that key.
See 2FA secret key setup for the full connection checklist.

Response

id
string
Account ID.
xUsername
string
X username.
xUserId
string
X user ID.
status
string
Account status (e.g. active).
health
string
Derived login/cookie health. One of healthy, locked, needsReauth, recovering, suspended, temporaryIssue. See Account health for meanings.
createdAt
string
ISO 8601 creation timestamp.
loginCountry
string
Optional ISO 3166-1 alpha-2 country code (for example "US"). Present only when the login session country differs from the selected proxy_country. Omitted when both countries match.
{
  "id": "3",
  "xUsername": "elonmusk",
  "xUserId": "44196397",
  "status": "active",
  "health": "healthy",
  "createdAt": "2026-02-20T08:15:00.000Z"
}
Related: Get X Account to check account status, or Connect X Account if you need to add a new account instead.
Last modified on May 23, 2026