Question
How do I automate a site that asks for two-factor sign-in?
Don't automate the second factor itself. Let the account owner complete sign-in once in a live browser, save the signed-in session, and start later runs from it — a saved session cookie does not ask for the code again. Replay it from the same IP, because a session that suddenly moves is what makes a site ask again.
Last updated
Why scripting the code is the wrong fix
Storing someone's authenticator secret or reading their SMS turns your automation into the weakest point of their account. It also does not help much: a site that sees a fresh login from a new address will often ask for more than a code.
A person signs in once
Open the session in a live viewer the account owner can use — from a phone if that is where their codes arrive — and let them complete the sign-in, including the code or the push approval. Then save the session.
Why the site asks again
Two-factor prompts come back when the session expires, when it is signed out from another device, or when it appears from somewhere new. Keeping each saved login on one exit IP and timezone avoids the last of those.
With Scrappy
Send the person the session's viewer link, capture the session when they finish, and create later sessions from that saved login. It replays from the residential IP it was captured on, and a BROWSER_LOGIN_LOST webhook tells you when the site ends it so you can ask the person to sign in again.
Questions
- Is a saved session safe to keep?
- Treat it like a password: it grants access to the account without the second factor. Scrappy stores saved logins encrypted and never returns their cookies from any endpoint. Get the user's consent first and delete the saved login when they disconnect.
- Can I try it before paying?
- Yes. A new account gets 100 credits, enough for a few sessions of real use. A session costs 5 credits to start and 1 per minute after that.
Start
Try it on the site you need this week. The first 100 credits are free.
Enough for ten scrapes or a first hour in the cloud browser. No card, no call, no minimum.