vinted-cli

Exit codes

What each exit status means, and which ones are worth retrying.

Every command exits with a code you can branch on. Nothing prints an error to stdout, so a script can read stdout and check $? independently.

CodeMeaningRetry?
0Success, including "nothing changed"-
1Generic failureMaybe
2Usage: bad flags, bad id or URL, an interval or --pages over the cap, a command past its 60-request budget, an invalid proxyNo, fix the command
3Auth: no session, session rejected, refresh refused, verification requiredNo, log in again
4Not found: item, user, conversation or watchNo
5Blocked by Vinted's bot protection (challenge or block page, HTTP 429), or refused during the cooldown that followsNo. Wait out the cooldown, see Staying unblocked
6Network or timeout, including an unreachable proxyYes
7API changed: a known endpoint or page returned an unexpected shapeNo, report it
130Interrupted-

Using them

if ! vinted auth refresh; then
  echo "session expired" >&2
  exit 1
fi

Retry the network, and stop on the rest. Never retry a 5: the CLI has already paused every request to that site for hours, and a retry would only fail at once.

vinted watch check --all
case $? in
  0) ;;
  6) sleep 300; vinted watch check --all ;;
  5) echo "blocked by vinted; see: vinted cooldown" >&2; exit 5 ;;
  *) exit 1 ;;
esac

Pair with the error envelope

--error-format json prints a stable category string next to the code. Branch on that when you log failures. See Output.

On this page