Disposable phone numbers for testing: what to use and what to avoid
To test SMS verification you need a phone number that isn't anyone's real phone. There are three common choices, and only one of them works well in automated tests.
1. Public "receive SMS online" sites
These sites show a list of numbers and the texts they get on a public web page. Anyone can see the codes, the numbers are shared with thousands of people, many services block them, and they come and go without warning. They are fine for a quick look by hand, never for a test suite. More in why public SMS sites break your tests.
2. Your SMS provider's magic test numbers
Providers like Twilio offer test credentials and special numbers that return fixed results without sending a real text. They are great for unit tests of your own code, because they are fast and free. But no real text is delivered, so they can't prove the message arrives or that the code in it works.
3. A private real number with an API
This is what end-to-end tests need. A real number that only you use, that receives real texts, and that your test can read as JSON. QuickInbox gives every paid plan a US number like this. Your test enters the number, triggers the code, and reads it back:
GET https://business.quickinbox.net/api/business/sms/numbers/:id/messages
X-API-Key: qk_live_...Each text comes back with the sender, the body and the time it arrived.
Which to use when
| Need | Best choice |
|---|---|
| Unit tests of your SMS code | Provider test credentials |
| End-to-end test of signup or 2FA | Private real number with an API |
| CI on every pull request | Private real number with an API |
| Quick manual look, nothing sensitive | Any of them |
Good habits
- Use test numbers only for test accounts, never for accounts you need to keep.
- Give each parallel test worker its own number, or run SMS tests one at a time.
- Wait for a new text after triggering the code, not just the latest one.
Related guides
- 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
- How to test Twilio Verify and OTP flows end to end
- 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.