Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

How To Validate And Lookup Global Phone Numbers In Your Apps

How To Validate And Lookup Global Phone Numbers In Your Apps

NumVerify is a full-fledged and powerful RESTful web service that allows global number validation and lookup services in more than 230 countries around the globe.

It offers a simple RESTful JSON API endpoint that you can send and receive correct information about a phone number. NumVerify API sends handy JSON-formatted data about the carrier, geographical location, line type, and more in seconds.

NumVerify API is easy to integrate.

The NumVerify API is platform agnostic and offers a simple connection in any platform. Moreover, with the power of Windows IDE, you can send and receive phone number validation information without coding because of low-code app development features.

How to integrate NumVerify API into the Delphi FireMonkey application?

In this post, we will create a fully functional cross-platform application using FireMonkey App Low Code Wizard. the FireMonkey Low Code Wizard fully integrates with the NumVerify API.

What exactly is the NumVerify API?

NumVerify API is a product built and maintained by apilayer and helping millions of developers to automate complex processes using solid RESTful web services. 

How do I set up the NumVerify API?

Just head over to the NumVerify API website (https://numverify.com/) and sign up for the free subscription by providing basic information. After signing up, you can open Dashboard, and there will be your API Access Key with documentation.

How to send a request to the NumVerify API endpoint?

Well, now you can send requests to the endpoint using your API access key. Just need to give the required parameters to the URL. 

Here is a sample API request with a sample JSON response.

After the request is successfully sent, you receive a clear JSON response. Each API response consists of 10 different response objects. You learn more about the response structure here (https://numverify.com/documentation)

How do I connect my applications to the NumVerify API?

In this demonstration, I utilize Delphi and FireMonkey to create a client app. REST Client components can work with any RESTful web service easily. 

The lightning-fast way of connecting to APIs is the RAD Studio Delphi REST Debugger

REST Debugger is a specialized tool for Delphi and C++ Builder developers. You can play with any kind of REST-based web service. Besides, after connecting and receiving the JSON response, you can quickly copy and paste components from the REST Debugger to your Delphi or C++ Builder project. And you are good to go!

How to build an app that runs on Windows, macOS, Android, and iOS and works with the NumVerify API

I pointed out to the FireMonkey App Low Code Wizard. Low Code Wizard helps us to initialize a fully functional cross-platform FireMonkey application. The wizard gives you different options and database functionalities. And then, you select the required features which, then generate a complete app.

How do I start using Low-Code development in RAD Studio?

Run your copy of RAD Studio. Open the GetIt Package Manager from the Tools menu. There you can search for a “low code” keyword. Now install the FireMonkey App Low Code Wizard.

Now you can utilize Low Code App Wizard and generate a fully functional app within seconds. For this, you should go on the menu: File->New->Other and select Multi-Device -> FireMonkey Template App.

Using the FireMonkey FMX Low Code App Wizard to create an app

The Low Code Wizard will now launch. You can specify the project name and specify the folder and select needed any settings you want. Here in this demonstration, I just checked the New Empty Form from an additional category.

Here are the final steps to our number verifier project

Now we should copy and paste the REST component from REST Debugger to our project. And select the RESTRequest1 component to clear out the items from the Params properties. And here I did little data binding with LiveBindings to automatically place the response to the Memo component.

Here is our project user interface structure

The last step is to copy and paste this code to our Send Request button

[crayon-673f6d0c2686b225306591/]

As you can see, to get into the complete app, you need a few steps, and if you would like to do customization to your low code app, you can customize as much as you want.

The finished low code phone number verification app

The final result of our Delphi FireMonkey application that integrated with NumVerify API.

Well, we utilized the FireMonkey Low Code Wizard to make our Delphi FireMonkey cross-platform app and learned how to utilize NumVerify API.

Head over and download the full source code for the NumVerify API with Delphi demo here: https://github.com/checkdigits/NumVerifyAPIDelphiFMX_example


RAD Studio has many powerful tools and features which can super-charge your apps and help achieve the professional and personal coding goals you aim for. Why not download a trial copy to today and see how it can help you turn your ideas into reality?

Exit mobile version