Verifying your Clients Mobile Phone Number with SMS


It’s really important that you can trust the information you have from your users and/or customers, and one major piece of that particular information is their mobile phone number, where you will be sending text messages and calls with alerts, or critical information. But that aside, being able to assert the identity of your users and clients gives your business an extra layer of security and confidence that your audience will really appreciate.

When to use the Number Verification Feature

There are many cases where verifying a mobile phone number is useful. Some examples are:

  • Two-Factor Authentication: Before allowing access to sensible information (or a web application) you ask for a password, but also authentication through an SMS.
  • Allowing Self Service: Before allowing a person to directly interact with your CRM or other systems via SMS, you can verify that the phone number is not only valid but owned by the right person.
  • Opts-in Verification: When a client opts-in to receive your alerts, news, or notifications, it is helpful to double check that it is in fact the mobile owner the one that is signing up with your service.
  • Personal data validation: For billing purposes, identity verification and similar scenarios, this is a powerful tool to assert the identity of the user.

Diving in

In this post we are going to discuss how to use one of our favorite product features, it is named “Number Verification”. For the impatient, the documentation for this feature can be found at our REST API documentation, and of course it can also be used from any of our Open Source SDKs.


When using Number Verification you will initiate a “Number Verification Operation” against a specific mobile phone number. This will result in an SMS being sent to that number with an OTP (One Time Password), which is a 6-digit number in this case.

The received code should then be entered via your mobile app or web page, where you will be able to query our systems (through our REST API or one of our SDKs) and check if the code entered is valid or not, and thus proceed accordingly.

This is a safe way to be sure that the mobile phone number entered by the user is actually valid, available, reachable, and of course, in possession of the right person.

Customizing the SMS

The SMS content can be fully customized by using text Templates. This will allow you to use different languages or use your brand name or include any other information you might want to send.

When initiating the verification operation you will specify which template to use, and the only requirement is that the template has a placeholder for the variable named “code” (i.e: the text {{code}} should be somewhere in the text of your template.

Final Words

Security is absolutely mandatory nowadays and clients really appreciate that companies take this matter seriously. By using this feature in different scenarios you will be able to give your clients an extra level of protection while enhancing the customer experience at the same time without any effort. If you’re unsure about the best way to integrate Number Verification with your current software solutions, don’t hesitate to get in touch with us, we’ll be happy to help!

— The PortaText Team.