You can screenshot an OTP-protected site with an AI agent by letting it open the site in a browser, completing the site’s normal one-time-password challenge yourself, and saving the authenticated browser state for a later run. The saved state is sensitive: it can contain cookies that let someone impersonate your session. This workflow reuses an authorized sign-in; it does not bypass multi-factor authentication.
The exact steps depend on the agent’s browser-control interface and the website. The example below uses Playwright, whose browser context can save and reload authentication state. Adapt it to an agent only if that agent supports the same browser operations.
As an Amazon Associate I earn from qualifying purchases.
What the workflow does—and does not do
An OTP challenge is part of the site’s sign-in process. Stop at that challenge and complete it through the site’s intended flow: enter the code yourself, or use an identity integration explicitly approved for the account and site. Do not ask an agent to evade the challenge, intercept codes, or automate access in a way the site or account owner has not authorized.
Recommended Free Tools
After sign-in, the browser can save cookies and local storage in a state file. A later run can load that file and visit a protected page without repeating the initial sign-in, as long as the site still accepts the session. This is session reuse, not a guarantee that OTP will never be required again.
#1 Best Overall
- Compatible with Nintendo Switch 2’s new GameChat mode
- Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
- Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
- Built-In Mic: The built-in microphone lets others hear you clearly during video calls
- Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
Set up an authorized Playwright browser session
Install Playwright and create a private state directory
-
In a new project directory, install Playwright:
npm install playwright. -
Create a directory for the state file and exclude it from version control. For example, add
private-auth/to.gitignorebefore saving any state there. -
Use a machine and account you are authorized to use. Keep screenshots private too; they may show account information even if the state file is protected.
Recommended: Fix Windows Errors and Clear Junk Files in Minutes - Free Scan →Recommended: Crashes or Glitches? A Free Driver Scan Usually Finds the Culprit →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.Rank #2
SaleLogitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black | Auto-Light Correct, Noise-Reducing Mic, Zoom, Microsoft, Teams, Skype, Nintendo Switch 2 New GameChat Mode, PC Mac compatible- Compatible with Nintendo Switch 2’s new GameChat mode
- Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
- The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
- C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
- The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
Complete the OTP challenge and save state
Run this setup script in a trusted local environment. It opens a visible Chromium window so you can sign in and enter the OTP yourself. Replace the login URL and the success condition with values appropriate to the site. The script deliberately waits for a page-specific signed-in marker before saving state.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext();
const page = await context.newPage();
try {
await page.goto('https://example.com/login');
console.log('Sign in in the browser. Complete the OTP challenge yourself.');
// Replace this with a selector that appears only after successful sign-in.
await page.locator('[data-testid="account-home"]').waitFor({
state: 'visible',
timeout: 0
});
await context.storageState({ path: 'private-auth/user.json' });
console.log('Authenticated state saved. Keep private-auth/user.json secret.');
} finally {
await browser.close();
}
})();
[data-testid="account-home"] is an example selector, not a Playwright API or a guaranteed element on your site. Choose a stable element that confirms the intended account is signed in. Alternatively, wait for a known final URL with Playwright’s page.waitForURL(). Avoid treating a successful navigation alone as proof of authentication: some sites redirect back to login or display an error page.
Load saved state and capture the target page
After setup, this separate script loads the saved state, opens the target URL, verifies a page-specific marker, and saves a full-page image. Replace the URL and selector. If the page contains private fields you do not want in the output, mask them as shown.
Rank #3
- 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
- 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
- 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
storageState: 'private-auth/user.json'
});
const page = await context.newPage();
try {
await page.goto('https://example.com/account/report', {
waitUntil: 'domcontentloaded'
});
// Replace with a marker that proves this is the expected signed-in page.
await page.locator('[data-testid="report-title"]').waitFor({
state: 'visible',
timeout: 15000
});
await page.screenshot({
path: 'page.png',
fullPage: true,
mask: [page.locator('[data-testid="private-account-number"]')]
});
console.log('Saved page.png');
} finally {
await browser.close();
}
})();
If no information needs masking, remove the mask option. For a viewport-only capture, set fullPage: false or omit it. Playwright’s screenshot assertions, such as toHaveScreenshot, are a separate visual-testing feature for its test runner; they wait for consecutive screenshots to stabilize before comparison. Use an ordinary page.screenshot() when you simply need an image file.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsProtect and maintain the authenticated state
-
Handle the state file like a credential. Playwright warns that browser state can contain sensitive cookies and headers that could be used to impersonate a user or test account, and strongly discourages checking it into a repository. Keep it outside source control, restrict file access, and do not attach it to logs or public artifacts.
-
Protect secrets used during sign-in. Microsoft Learn’s Power Platform Playwright Samples say never to commit passwords to source control and recommend environment variables or a secrets manager. Do not hard-code credentials into a script or send them to an agent unless its handling is explicitly approved.
Rank #4
SaleEMEET C960 1080P Webcam with Microphone, 2 Mics, 90° FOV, Computer Camera | USB Type-A & A-to-C Adapter, Fixed Focus, Plug&Play for Zoom/Teams/Facetime/YouTube/Google Meet/Switch 2 Camera, 2025 Version- 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
- Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
- Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
- Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
- High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
-
Refresh expired state through normal sign-in. A site can expire or revoke a session, and sites differ in how they handle cookies and local storage. If the saved state no longer works, repeat the authorized login and OTP flow, save fresh state, and remove the old file securely.
-
Keep the screenshot separate from the state file. The image can expose personal or business data even though it cannot itself restore the browser session. Store, share, and retain it according to the site’s and account owner’s rules.
Free tools Windows power users keep installed
One-click scans. No signup required.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Choose the right capture behavior
-
Use a page-specific URL or visible element to confirm the OTP transition completed and that the later run reached the intended page.
Best Value
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black | 30fps Video, Clear Audio, Light Correction, Works with Teams, Meet, Zoom, Nintendo Switch 2, Mac, Tablet- Compatible with Nintendo Switch 2’s new GameChat mode
- HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
- Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
- Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
- Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video
-
Use
fullPage: truefor a long page when one image should include content beyond the viewport. For a visual regression test, use Playwright Test’s screenshot assertion rather than treating a raw capture as a comparison. -
Use locator masking to cover selected sensitive interface elements in the image. Masking changes the screenshot only; it does not remove information from the website or from the browser state.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| The setup never reaches the state-save step. | The chosen success selector does not exist, is not visible, or the login did not finish. | Inspect the page after completing OTP, then use a stable element that appears only when signed in, or wait for the site’s known final URL. |
| The later run returns to the login or OTP page. | The site expired or rejected the saved session, or the saved state does not cover the site’s authentication behavior. | Complete the normal sign-in flow again and save new state. There is no universal OTP lifetime or guarantee that state will work on every site. |
| The screenshot is blank or captures the wrong page. | Navigation may have ended at a redirect, error, or intermediate page; the target content may not yet be present. | Check the current URL and wait for a target-specific visible marker before calling screenshot(). |
| A private field is visible in the image. | The screenshot includes the page as rendered; saving browser state does not redact screenshot pixels. | Mask the relevant locator in the screenshot call, or capture only a region that excludes it, then verify the resulting image before sharing. |
| A state file or screenshot was committed or shared accidentally. | These artifacts can expose access or personal information. | Remove the artifact from the repository and any shared locations, restrict access, and revoke or refresh the affected session if exposure could enable account access. |
Or skip the browser setup
ScreenshotNeo provides a one-request screenshot API and an MCP server for AI agents. It removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. It is suited to pages the API can access, but the documented call below does not complete an interactive OTP challenge or reuse the Playwright state file. Use the authorized browser workflow above for pages that require your signed-in session.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteThe example captures a publicly accessible page. See the ScreenshotNeo API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo includes the MCP tools take_screenshot, get_page_info, and capture_pdf for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for 1,000 free screenshots a month with no card.
Frequently Asked Questions
Can an AI agent receive or enter the OTP for me?
Only use an integration explicitly authorized for the account and site. The general browser workflow described here pauses for the account holder to complete the site’s normal challenge.
Will the saved browser state work in a different browser or agent?
Not necessarily. State formats and site session behavior vary; validate the chosen agent’s current documentation and the target site’s behavior.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

