Real Browser Profiles
Connect to your existing Chrome browser to reuse your authenticated sessions. No need to handle logins, cookies, or 2FA - if you are logged in on Chrome, the agent is, too.See Real Browser for more details and platform paths.
Storage State Persistence
Export cookies and localStorage from an authenticated browser, then load them in headless mode. Useful for production/CI where you cannot use a real browser profile.See Browser Parameters for all storage options.
Export from Real Browser
Load in Headless Mode
Auto-Save and Load
When you provide astorage_state path, Browser-Use automatically:
- Loads cookies from the file on startup (if it exists)
- Saves cookies to the file periodically and on shutdown
Storage State Format
The JSON file follows Playwright’s format:TOTP 2FA
For sites using authenticator apps (Google Authenticator, 1Password, etc.), Browser-Use can generate TOTP codes automatically.See Sensitive Data for more on credential handling.
How It Works
- Get the TOTP secret key when setting up 2FA (usually shown as “manual entry” or “cannot scan QR code”)
- Pass the secret with
bu_2fa_codesuffix insensitive_data - When the agent inputs
bu_2fa_code, it generates a fresh 6-digit code
Where to Find TOTP Secrets
- 1Password: Edit item → One-Time Password → Show secret
- Google Authenticator: During setup, click “Can’t scan it?” to see the key
- Authy: Export via desktop app settings
- Most sites: Look for “manual entry” or “setup key” during 2FA enrollment
Email and SMS 2FA
For sites that send verification codes via email or SMS, use follow-up tasks to retrieve the code.With AgentMail
AgentMail provides disposable inboxes for email verification:examples/integrations/agentmail/ for a more complete implementation with email waiting and parsing.
With 1Password SDK
Retrieve codes from your password manager:examples/custom-functions/onepassword_2fa.py for the full example.
With Gmail API
Built-in Gmail integration for reading 2FA codes from your inbox:- Enable Gmail API in Google Cloud Console
- Create OAuth 2.0 credentials (Desktop app)
- Save credentials to
~/.config/browseruse/gmail_credentials.json
examples/integrations/gmail_2fa_integration.py for setup with automatic credential validation.
Security Best Practices
See Secure Setup for enterprise security with Azure OpenAI.
Restrict Domains
Limit where the browser can navigate to prevent credential leaks:Disable Vision for Sensitive Pages
Prevent screenshots from being sent to the LLM:Domain-Specific Credentials
Route credentials to specific domains only:Cloud Browser Profiles
For production deployments, consider Browser Use Cloud, which provides:- Persistent browser profiles in the cloud
- Pre-authenticated sessions
- No local Chrome installation required
- Built-in proxy and fingerprint management