Test the connection

3 min read · updated 2026-06-11

Every key save runs a connection test before anything persists: SleeveFolio asks Alpaca for your basic account details using the keys you supplied — a read-only check. A pass proves the keys are valid, match the environment (paper keys against Alpaca’s paper system, live keys against live), and identify exactly one account.

What a pass looks like

The broker card flips to active, shows the masked key, and stamps the last-tested time. SleeveFolio also records your Alpaca account id — that’s how later broker events are matched back to your account and nobody else’s.

Common failures

SymptomUsual causeFix
An “unauthorized” error (code 401)Typo in key/secret, or a revoked pairRegenerate at Alpaca and re-paste both halves
Wrong-environment errorLive keys pasted into the paper card (or vice versa)Check which Alpaca dashboard generated them
TimeoutAlpaca outage or network hiccupRetry; check Alpaca’s status page

More cases in Broker connection errors.