Payments & Commercevendor:shopifyEmail OTPUnwrapped Magic LinkCarrier SMS DIDCloud KMS TOTP
Automate Shopify Admin & Partners 2FA in Playwright, Stagehand & Browser Use
Unblock headless Shopify Admin, Partners, and merchant store logins across Email OTPs, confirmation links, US SMS DIDs, and KMS TOTP.
1. 60-Second Gmail & Outlook Auto-Forwarding Filter
Don't want to change your existing account email on Shopify? Keep your corporate inbox on Shopify and forward only verification emails to <identity-slug>@in.sentryrelay.com. Sentry Relay's Stage 2 unwrapper preserves the original Shopify sender header automatically (full setup guide).
# Paste into Gmail -> Settings -> Filters -> Create a new filter ("Has the words")
from:(shopify.com) ("authentication code" OR "verification code" OR "security code" OR "log in to Shopify")
# Action: Forward it to -> <your-identity-slug>@in.sentryrelay.com2. Copy-Paste Shopify 2FA Automation Snippets
Choose your browser automation stack below. All snippets resolve codes in <200ms with Upstash Redis 15-second lookback protection so arrived-before-wait race conditions never fail a run.
import { test, expect } from '@playwright/test';
import { SentryRelay } from '@sentryrelay/sdk';
const relay = new SentryRelay({ apiKey: process.env.SENTRY_RELAY_API_KEY! });
test('Shopify Partners login with unattended 2FA', async ({ page }) => {
await page.goto('https://accounts.shopify.com/login');
await page.fill('input#account_email', process.env.SHOPIFY_EMAIL!);
await page.click('button[type="submit"]');
await page.fill('input#account_password', process.env.SHOPIFY_PASSWORD!);
await page.click('button[type="submit"]');
// Shopify often triggers an email or SMS code on cloud browser logins
const auth = await relay.wait('shopify-ops', { sender: 'shopify.com', timeout: 30 });
if (auth.event?.otpCode) {
await page.fill('input[name="code"], input[autocomplete="one-time-code"]', auth.event.otpCode);
await page.click('button[type="submit"]');
}
await expect(page).toHaveURL(/admin\.shopify\.com|partners\.shopify\.com/);
});3. Shopify Production Gotchas
Store Order Emails Cannot Hijack Your Extraction
Merchant email accounts receive hundreds of "Order #123456" emails daily. Stage 4 explicitly disqualifies order and payout emails before running OTP extraction.
Multi-Client Agency Merchant Isolation
E-commerce agencies managing 20+ Shopify stores can assign each store its own Identity and `scopedIdentityIds` API key so store scripts never cross-read another merchant's OTP.
Device Confirmation vs. 2FA Codes
Shopify periodically sends both a 6-digit OTP and a verification URL on unrecognized IPs. `auth.event` returns both `otpCode` and unwrapped `magicLink` cleanly.