Get Screenshot
Returns a base64-encoded screenshot of the current WhatsApp engine state.
Authentication Required
Login to swap the placeholders with your real Instance ID and Access Token.
Log InNo query parameters required
This endpoint doesn't expect data in the URL.
Best practices
Use only for debugging failed connection attempts.
Check for 'Logout' or '2FA' prompts visible in the screenshot.
Do not poll this endpoint continuously in production.
Visual Forensics: Debugging with the Screenshot Endpoint
The /v2/auth/screenshot endpoint is the "X-Ray" tool of the Wawp platform. Because our engines run in highly optimized, headless environments, developers often feel "blind" when a session fails to link. This endpoint provides a high-fidelity, real-time snapshot of exactly what the Chromium browser engine is rendering. It is the ultimate tool for audit logging, technical support, and protocol verification.
🏗️ Technical Specifications
The response is a JSON envelope containing:
- mimetype: Fixed as
image/png. - data: A Base64-encoded string representing the raw pixels of the engine's current display.
Decoding for Visualization
To view the screenshot in a browser or admin dashboard, use the standard Base64 image pattern:
<img src="data:image/png;base64,{{response.data}}" alt="Engine State" />
🛡️ Strategic Use Cases for Debugging
1. Identifying "Manual Interaction" Blockers
Sometimes, WhatsApp displays a modal message that cannot be handled by standard automation logic.
- The "Logout" Confirmation: If a user tries to link a device that is already linked elsewhere, WhatsApp might show a "Confirm Logout" popup. The screenshot will reveal this immediately, allowing your support staff to tell the user: "Please click 'Confirm' on your phone."
- Two-Step Verification: If the account has a PIN enabled, the screenshot will show the PIN entry screen, signaling that you need to use our account-meta endpoints to submit the 2FA code.
2. QR Visibility Audits
If your frontend claims the QR has loaded, but users say it’s not scanning, use the screenshot endpoint to verify:
- Is the QR actually there? (Sometimes network jitter on the WhatsApp side causes a blank screen).
- Is it a different version? (WhatsApp periodically updates its UI; the screenshot helps you stay ahead of these changes).
🛡️ Best Practices & Performance
A. Resource Awareness
Unlike simple status checks, generating a screenshot involves a "Capture and Encode" cycle within the Chromium container.
- Recommendation: Do not poll this endpoint automatically every second. It should be triggered "On-Demand" by a support agent or when your backend detects an unusually long
SCAN_QR_CODEduration (e.g., > 2 minutes).
B. Security and Privacy
Screenshots are transient. Wawp does not store these images on our persistent disks.
- Developer Action: If you need to keep an audit log of connection states for compliance (e.g., in a regulated Fintech environment), you must fetch the screenshot and store it in your own secure storage (S3/Cloud Storage).
💡 Advanced Automation: "Visual OCR"
Sophisticated developers use the screenshot endpoint in combination with OCR (Optical Character Recognition) libraries like Tesseract. This allows your system to "read" error messages directly from the WhatsApp UI and transform them into actionable logs:
- "The number provided is banned."
- "The battery is too low to sync."
- "Checking for messages..."
Summary of Capabilities:
- Visualize the raw state of the headless WhatsApp engine.
- Identify 2FA prompts and confirmation modals instantly.
- Perform high-fidelity audit logging for connection events.
- Empower support staff to see what the user sees without manual screen sharing.
Request Parameters
Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.
Query Parameters & Request Body
Supported in URL Query String or JSON Bodystring | The 12-character ID of the instance Example: | ||
string | Your API Access Token Example: | ||
string | — | Optional session name (alternative to instance_id). Example: |
Build with AI using Wawp MCP
MCP READYConnect Wawp API directly to Cursor, Windsurf, or Claude Desktop. Let AI write, test, and execute your WhatsApp integration code automatically!
Request Samples
Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.
Expected Responses
Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.
Example
{
"mimetype": "image/png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
}Command Palette
Search for a command to run...