Skip to content
ViceVox
MenuClose
DocumentationFix a signed-out account

How to check and fix a signed-out account

Last updated

An account can lose its session: cookies expire, the platform signs it out, or someone changes the password. Check the session, read why it ended, and sign the account in again with the method that fits.

You need a ViceVox API key and the account's id, or your workspace id for a whole list.

Read the account's status

GET/v1/accounts/{id}

Request
curl https://api.vicevox.com/v1/accounts/$ACCOUNT_ID \
  -H "Authorization: Bearer $VICEVOX_API_KEY"
200 OK (trimmed)
{
  "id": "0199a1b2-...",
  "platform": "instagram",
  "status": "signed_out",
  "status_reason": "Signed out. Sign in again with a sign-in link or connect.",
  "has_credentials": false,
  "last_checked_at": "2026-10-29T07:00:00Z"
}

status_reason says what happened, such as "The stored login did not work." or "The imported cookies did not sign in." To find every account in one state, filter the list: GET /v1/workspaces/{ws}/accounts?status=signed_out.

connecting
ViceVox is signing in.
active
Signed in and ready.
needs_input
A sign-in challenge waits for an answer.
signed_out
Cookies expired and no stored credentials could sign in again.
blocked
The platform shows a checkpoint on the account.
error
Something failed that ViceVox could not classify.

Check the session

POST/v1/accounts/{id}/check

The status shows what ViceVox saw last. A check opens the account now and reports whether it is signed in. It does not try to sign in. It sets status and last_checked_at.

curl

curl
curl -X POST "https://api.vicevox.com/v1/accounts/$ACCOUNT_ID/check?wait=60" \
  -H "Authorization: Bearer $VICEVOX_API_KEY"

JavaScript

JavaScript
// Check every account in the workspace and print the ones that need a person.
const api = "https://api.vicevox.com/v1";
const headers = { Authorization: `Bearer ${process.env.VICEVOX_API_KEY}` };

const list = await fetch(
  `${api}/workspaces/${process.env.WORKSPACE_ID}/accounts?limit=100`,
  { headers },
);
if (!list.ok) throw new Error(`${list.status}: ${await list.text()}`);
const { accounts } = await list.json();

for (const account of accounts) {
  const res = await fetch(`${api}/accounts/${account.id}/check?wait=60`, {
    method: "POST",
    headers,
  });
  if (!res.ok) throw new Error(`${account.id}: ${await res.text()}`);
  const check = await res.json();
  const state = check.result?.state ?? check.error?.code ?? check.status;
  if (state !== "signed_in") console.log(account.platform, account.label, state);
}

Python

Python
# Check every account in the workspace and print the ones that need a person.
import os
import requests

api = "https://api.vicevox.com/v1"
headers = {"Authorization": f"Bearer {os.environ['VICEVOX_API_KEY']}"}

listing = requests.get(
    f"{api}/workspaces/{os.environ['WORKSPACE_ID']}/accounts",
    params={"limit": 100},
    headers=headers,
    timeout=30,
)
if not listing.ok:
    raise SystemExit(f"{listing.status_code}: {listing.text}")

for account in listing.json()["accounts"]:
    resp = requests.post(
        f"{api}/accounts/{account['id']}/check",
        params={"wait": 60},
        headers=headers,
        timeout=70,
    )
    if not resp.ok:
        raise SystemExit(f"{account['id']}: {resp.text}")
    check = resp.json()
    state = ((check.get("result") or {}).get("state")
             or (check.get("error") or {}).get("code")
             or check["status"])
    if state != "signed_in":
        print(account["platform"], account["label"], state)

result.state is signed_in, signed_out or blocked. ViceVox does not check accounts on a schedule of its own. Run this from your own scheduler, for example each morning or before a campaign.

Note: You may not need a check at all. When an action finds the account signed out and a login is stored, ViceVox signs in again once during that action. If the platform then asks for an email or SMS code, the action stops at needs_input and waits for your answer.

Sign in again

WhenDo
A login is stored and still right (has_credentials: true).Connect with { "method": "password" } and no username or password.
The password changed.Connect with the new username and password. ViceVox stores them first.
You can export fresh cookies.Connect with { "method": "cookies", "cookies": ... }.
Only the owner can sign in, or the status is blocked.Create a sign-in link and send it to the owner.

POST/v1/accounts/{id}/connect

Sign in with the stored login
curl https://api.vicevox.com/v1/accounts/$ACCOUNT_ID/connect \
  -H "Authorization: Bearer $VICEVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connect": { "method": "password" } }'
Sign in with a new password
curl https://api.vicevox.com/v1/accounts/$ACCOUNT_ID/connect \
  -H "Authorization: Bearer $VICEVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connect": {
      "method": "password",
      "username": "acme_demo",
      "password": "the-new-password",
      "totp_secret": "JBSWY3DPEHPK3PXP"
    }
  }'

Both answer 202 with the connect action. Wait on it with GET /v1/actions/{id}?wait=60, and answer any challenge with POST /v1/actions/{id}/answer, as inthe 2FA guide.

POST/v1/accounts/{id}/sign-in-links

A sign-in link for the owner
curl -X POST https://api.vicevox.com/v1/accounts/$ACCOUNT_ID/sign-in-links \
  -H "Authorization: Bearer $VICEVOX_API_KEY"

The link opens the account's live browser for 30 minutes, without a ViceVox login. When the owner signs in and presses Done, the account is active again.

Clear a checkpoint on a blocked account

blocked means the platform shows a checkpoint, and status_reason carries the platform's own text. Send the owner a sign-in link, or open it yourself, and follow the platform's steps in the live browser. Then run a check to confirm the account is signed_in.

Troubleshooting

422 invalid_input
"This account has no stored login: send username and password, or connect with cookies or a browser." Store a login, send one, or use another method.
422 invalid_input
"Send username and password, or neither to use the stored login." You sent only one of them.
Action error signed_out
"The account is signed out and no stored credentials could sign it in again." Use one of the ways in Sign in again.
Telegram without a password
A Telegram account stored without a two-step password cannot sign in again from the stored login. Send the owner a sign-in link instead.

See also

To run this on your own accounts, create a ViceVox account, then add an account and an API key.