If your app signs users in with Firebase Phone Authentication, Firebase sends the SMS itself, so use its fictional test numbers or the Firebase Auth emulator; otpmock cannot intercept those messages. If your app sends codes through an SMS provider such as Twilio, Vonage or AWS SNS, Firebase's tools don't apply, and a mock inbox like otpmock does.
What Firebase offers
- Fictional phone numbers. In the Firebase console you can register test numbers with fixed verification codes. No SMS is sent and the code is always the one you configured.
- The Auth emulator. In the Local Emulator Suite, phone sign-in sends no SMS; the codes appear in the emulator and can be read through its REST API.
Both are designed for Firebase Phone Authentication, where Firebase generates and delivers the code.
Where otpmock fits
Many apps don't use Firebase for phone verification. They generate a code themselves or call a Verify API, and send it through an SMS provider. For those apps, otpmock stands in for the provider: the SDK talks to otpmock in test environments, and tests read the code over HTTP.
Side by side
| Firebase test numbers / emulator | otpmock | |
|---|---|---|
| Applies to | Firebase Phone Authentication | Apps sending via SMS provider APIs |
| Code | Fixed per number, or emulator-generated | Generated by your app or the emulated Verify API |
| Any phone number per test | Emulator: yes. Console test numbers: a fixed list | Yes |
| Shared staging environment | Console test numbers: yes. Emulator: local | Yes |
| Cost | Free | Free up to 100 messages a month |
Using both
Some apps use Firebase for sign-in and an SMS provider for other texts, such as transaction confirmations. Use Firebase's tools for the first and otpmock for the second.
FAQ
Can otpmock receive Firebase Phone Auth codes?
No. Firebase delivers those messages itself, so there is no SDK option to redirect them. Use Firebase's test numbers or emulator.
Is otpmock affiliated with Firebase or Google?
No.
Product names are trademarks of their owners; otpmock is not affiliated with them. Descriptions of other products reflect their public documentation as of October 2026.
The free plan includes 100 messages a month. No card required.
Get a free API key