SMS verification API for testing OTP codes
Most "SMS verification APIs" send codes. To test your app you need the other half: a number that receives the code and gives it back to your test as data.
Sending API vs testing API
Your app already uses a provider like Twilio, Vonage or AWS SNS to send codes. A testing API sits on the receiving side. It gives your tests a real phone number and lets them read what arrives, so you can check the whole chain: your code asked for a text, the provider delivered it, and the code inside works.
How it works with QuickInbox
- Claim a number. Every paid plan includes a real US number. Claim it on the SMS page in your workspace.
- Use it in your app. Your test types the number into the phone field and triggers the code.
- Read the text.
GET /api/business/sms/numbers/:id/messagesreturns the texts as JSON, newest first, each withfrom_number,bodyandreceived_at. - Finish the flow. Pull the code out of the body and type it in.
The API in one example
curl "https://business.quickinbox.net/api/business/sms/numbers" \
-H "X-API-Key: $QI_KEY"
# => { "numbers": [ { "id": 3, "phone_number": "+1...", ... } ], ... }
curl "https://business.quickinbox.net/api/business/sms/numbers/3/messages" \
-H "X-API-Key: $QI_KEY"
# => { "messages": [ { "from_number": "+1...", "body": "Your code is 482913", ... } ] }The number's id comes from the first call; it's not the phone number itself. Full reference: Business API docs.
Framework guides
- SMS OTP in Playwright
- SMS OTP in Cypress
- SMS 2FA in Selenium (Python)
- Phone verification in mobile apps (Appium)
- SMS 2FA in GitHub Actions
Email codes too
The same account and API key give you private test inboxes, so one test suite can cover both email and SMS codes. See email OTP testing.
Related guides
- Disposable phone numbers for testing: what to use and what to avoid
- How to test SMS OTP codes in Playwright
- How to test SMS OTP codes in Cypress
- How to test SMS 2FA in Selenium with Python
- SMS testing overview
Get a test number: every paid QuickInbox plan includes a real US phone number and a monthly SMS allowance, with plans from $9 a month. Extra packs start at $5 a month. See SMS testing and pricing.