Firebase Phone Number Verification

Firebase Phone Number Verification (Firebase PNV) is a fast and secure method for verifying user phonenumbers. Unlike SMS-based verification, which requires users to receive andinput a code from a text message,Firebase PNV works by getting the phone number forthe SIM in the device directly from the connected carrier with a single tap. Thisreduces friction for the user, improves reliability by not depending on SMSmessage delivery, and eliminates abuse vectors commonly exploited when using SMS.

Key capabilities

Carriers are the source of truthWithFirebase PNV, Google obtains the verified phone number for the SIM directly from the carrier, telling you what number is on the device running your app right now. SMS OTPs can only tell you if the user has access to the phone number.
Use standalone or with an identity providerYou can useFirebase PNV on its own as an easy-to-integrate and reliable method of phone number verification, or you can use it as a sign-in method withFirebase Authentication or your own authentication system.
Automatically use available carriersYou can use theFirebase PNV SDK to detect compatibility and fall back to another method such as SMS whenFirebase PNV is not yet supported on the device.Firebase PNV will gradually become available for carriers worldwide. As new carriers become available, you can automatically use them with no additional changes to your app. SeeCarrier support for a list of the participating carriers.
Eliminate SMS phishing attacksSinceFirebase PNV doesn't send any SMS messages to verify a phone number, users are not expecting messages from your app with one time passcodes, which can be used in account takeover attacks.

How does it work?

When you make a phone number verification request,Firebase PNV:

  1. Checks that the user's device and mobile carrier are supported.

  2. Gets consent from the user to share their phone number with your app.

  3. Works with the mobile carrier assigned to the SIM to obtain the verifiedphone number.

  4. Returns to your app a signed token containing the verified phonenumber, typically in 1-3 seconds from user consent.

After verifying the signature of this token, your app now has the user'sverified phone number. You can also use this token as part of a phone numberbased sign-in flow, for example usingFirebase Authentication or your ownauthentication backend.

Beta:Firebase Authentication support is under development, and does not accept theFirebase PNV token as a sign-in token. To implement sign-in usingFirebase PNV andFirebase Authentication, you can use custom authentication to exchange theFirebase PNVtoken for aFirebase Authentication token. For an example, see theAuthenticate with Firebase usingFirebase Phone Number Verification page.

Implementation path

Set up your Firebase projectIn theFirebase console, complete onboarding steps to enable billing and theFirebase Phone Number Verification API for your Firebase project.
Install the SDK and initializeInstall theFirebase PNV SDK for your app's platform. The SDK requires that OAuth brand verification has been successfully completed.
Design an explainer screen(Recommended) Before triggering the formal user consent UI, explain that they need to select a SIM to fetch the number for, and how this is faster and more secure than SMS OTPs. This will reduce confusion, and train users on the new phone number verification flow.
Check for device and carrier compatibility(Recommended) When your app launches, use theFirebase PNV SDK to check that the device and its mobile carrier are compatible withFirebase PNV. If it is compatible, display the explainer screen, and prompt for consent. If it isn't, use your legacy method of phone number verification, such as SMS.
Request the verified phone numberUse theFirebase PNV SDK to request the device's verified phone number from the mobile carrier. This triggers user consent, which your explainer screen helps prepare the user to complete.
Verify the response tokenIn the response from theFirebase PNV service, you get a signed token, which you can send to your app's backend. On the backend, verify the signature of the token. If the signature is valid, then the token contains the device's verified phone number.

Next steps

  • Firebase PNV is a billed service that incurs a cost per verification. See thePricing page for details.
  • See theGet started on Android guide to learn how touseFirebase PNV in an Android app.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-03 UTC.