Developer & AIvendor:openaiEmail OTPUnwrapped Magic LinkCarrier SMS DIDCloud KMS TOTP
Automate OpenAI & ChatGPT Email OTP, SMS & TOTP in Playwright
Automate OpenAI Platform & ChatGPT email verification codes, magic links, SMS phone verification, and KMS TOTP for unattended agent workflows.
1. 60-Second Gmail & Outlook Auto-Forwarding Filter
Don't want to change your existing account email on OpenAI & ChatGPT? Keep your corporate inbox on OpenAI & ChatGPT and forward only verification emails to <identity-slug>@in.sentryrelay.com. Sentry Relay's Stage 2 unwrapper preserves the original OpenAI & ChatGPT sender header automatically (full setup guide).
# Paste into Gmail -> Settings -> Filters -> Create a new filter ("Has the words")
from:(openai.com OR tm.openai.com) ("verification code" OR "log-in code" OR "ChatGPT code" OR "one-time code")
# Action: Forward it to -> <your-identity-slug>@in.sentryrelay.com2. Copy-Paste OpenAI & ChatGPT 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('Automate OpenAI Platform email OTP or magic link login', async ({ page }) => {
await page.goto('https://platform.openai.com/login');
await page.fill('input[type="email"]', 'openai-bot@in.sentryrelay.com');
await page.click('button[type="submit"]');
const auth = await relay.wait('openai-bot', {
sender: 'openai.com',
timeout: 30,
});
if (auth.event?.otpCode) {
await page.fill('input[name="code"]', auth.event.otpCode);
await page.click('button[type="submit"]');
} else if (auth.event?.magicLink) {
await page.goto(auth.event.magicLink);
}
await expect(page).toHaveURL(/platform\.openai\.com|chatgpt\.com/);
});3. OpenAI & ChatGPT Production Gotchas
Transactional Sender Subdomain (`tm.openai.com`)
OpenAI sends login verification codes from `noreply@tm.openai.com`. Querying `sender: "openai.com"` matches both `openai.com` and `tm.openai.com` automatically.
API Usage Receipts Ignored
Monthly OpenAI billing receipts and usage alerts are explicitly disqualified so billing numbers never get returned as OTPs.
Phone Verification Uses Dedicated US DIDs
If creating or verifying a new OpenAI workspace requires SMS verification, use a paid Sentry Relay Identity with a dedicated US carrier Telnyx DID.