Developer & AIvendor:anthropicEmail OTPUnwrapped Magic LinkCloud KMS TOTP

Automate Anthropic Console & Claude Magic Link & 2FA in Playwright

Automate Anthropic Console & Claude.ai magic links, 6-digit login verification codes, and KMS TOTP in Playwright, Stagehand, and Browser Use.

Curated Stage 4 Extractor Profile (vendor:anthropic)

Extracts 6-digit verification codes and `claude.ai/magic-link` or `console.anthropic.com` confirmation links across `anthropic.com`, `mail.anthropic.com`, and `claude.ai`, while filtering out API credit reload receipts.

Matched Sender Domains
anthropic.commail.anthropic.comclaude.ai
Login URL example: https://console.anthropic.com/login
Filtered Non-Auth Noise
  • Receipt from Anthropic
  • API credit reload confirmations

1. 60-Second Gmail & Outlook Auto-Forwarding Filter

Don't want to change your existing account email on Anthropic & Claude? Keep your corporate inbox on Anthropic & Claude and forward only verification emails to <identity-slug>@in.sentryrelay.com. Sentry Relay's Stage 2 unwrapper preserves the original Anthropic & Claude sender header automatically (full setup guide).

# Paste into Gmail -> Settings -> Filters -> Create a new filter ("Has the words")
from:(anthropic.com OR mail.anthropic.com OR claude.ai) ("verification code" OR "login code" OR "magic link" OR "sign in to Claude")

# Action: Forward it to -> <your-identity-slug>@in.sentryrelay.com

2. Copy-Paste Anthropic & Claude 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('Sign into Anthropic Console with magic link or 6-digit email code', async ({ page }) => {
  await page.goto('https://console.anthropic.com/login');
  await page.fill('input[type="email"]', 'claude-ops@in.sentryrelay.com');
  await page.click('button[type="submit"]');

  const auth = await relay.wait('claude-ops', {
    channel: 'email',
    timeout: 30,
  });

  if (auth.event?.magicLink) {
    await page.goto(auth.event.magicLink);
  } else if (auth.event?.otpCode) {
    await page.fill('input[name="code"]', auth.event.otpCode);
    await page.click('button[type="submit"]');
  }

  await expect(page).toHaveURL(/console\.anthropic\.com|claude\.ai/);
});

3. Anthropic & Claude Production Gotchas

Frequently Asked Questions

Can Sentry Relay handle both magic links and 6-digit codes from Anthropic?
Yes. The vendor:anthropic rule extracts both 6-digit login codes and claude.ai / console.anthropic.com magic links.
Why does Anthropic send from mail.anthropic.com?
Transactional sign-in links arrive from mail.anthropic.com. Our rule covers anthropic.com, mail.anthropic.com, and claude.ai.
Can Claude Code itself call Sentry Relay via MCP?
Yes. Run claude mcp add sentryrelay -e SENTRY_RELAY_API_KEY=sr_live_... -- npx -y @sentryrelay/mcp or connect to https://sentryrelay.com/api/mcp.
Provision an Isolated Identity for Anthropic & Claude

Start free in 3 minutes with 2 isolated @in.sentryrelay.com Identities, 250 monthly email extractions, and Cloud KMS TOTP vaulting.