How to Test Email & SMS Verification (OTP & Magic Links) in React Without Twilio or SendGrid
Learn how to test OTP verification codes, magic links, email templates, and SMS alerts using Playground API's Virtual Web Inbox.

How to Test Email & SMS Verification (OTP & Magic Links) in React Without Twilio or SendGrid
Building authentication and onboarding flows often requires sending transactional emails and SMS messages:
- 6-digit OTP verification codes (Two-Factor Auth / Phone login).
- Passwordless magic login links.
- Welcome emails and invoice receipts.
Testing these flows during local development usually requires setting up Mailtrap, Twilio, or SendGrid accounts, which cost money and slow down automated testing suites.
Playground API now provides a dedicated Virtual In-Browser Email & SMS Web Inbox!
1. Dispatching Virtual Emails & SMS Messages
Send transactional communications via simple REST endpoints:
2. Real-Time In-Browser Web Inbox
Instead of checking an external email inbox, navigate to:
👉 https://playground.nileslabs.com/docs/inbox
The virtual inbox displays:
- 📬 Live Message List: Incoming emails and SMS messages appear instantly with zero page reloads.
- 🔑 Automatic OTP Parser: Automatically extracts 6-digit verification codes into a 1-click copy badge.
- 🌐 HTML Email Previewer: Render responsive email templates, inspect raw HTML, and click test links.
- 📱 SMS Device View: Visual phone screen displaying simulated SMS bubbles.
3. Automated E2E Testing with Playwright & Cypress
Query messages programmatically in your automated test suites:
4. Interactive Inbox Studio
Explore email sending, OTP extraction, and live templates directly in the documentation:
👉 https://playground.nileslabs.com/docs/inbox
Conclusion
Test authentication flows, magic links, and OTP codes effortlessly with Playground API!
Try Playground API in Your Own App
Stateful mock REST & GraphQL API with private sandbox overlays.