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.
Table of Contents
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.
- Number Validation – Keep your user database clean and fight fraud by validating.
- Swift & Secure API – Easy to integrate URL structure
- Advanced Tools – Configure lookup options with a set of parameters
- Cost-effective API
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
procedure TNewFormFrame.BtnRequestClick(Sender: TObject); begin inherited; var IsDebug := ''; MemResponse.Lines.Clear; RESTClient1.ResetToDefaults; RESTClient1.Accept := 'application/json'; RESTClient1.AcceptCharset := 'UTF-8, *;q=0.8'; RESTClient1.BaseURL := 'http://apilayer.net/api/validate'; if ChkFormat.IsChecked then begin IsDebug := '1' end else IsDebug := '0'; RESTRequest1.Resource := Format('?access_key=%s&number=%s&country_code=%s&format=%s', [EdtAccKey.Text, EdtPhoneNum.Text, CBBCountryCode.Selected.Text, IsDebug]); RESTResponse1.ContentType := 'application/json'; // send request RESTRequest1.Execute; // get values from JSON var JSONValue := TJSONObject.ParseJSONValue(RESTResponse1.Content); try if JSONValue is TJSONObject then begin LblValid.Text := 'IsValid: ' + JSONValue.GetValue<string>('valid'); LblCountry.Text := 'Country: ' + JSONValue.GetValue<string>('country_name'); LblLocation.Text := 'Location: ' + JSONValue.GetValue<string>('location'); LblLineType.Text := 'Line Type: ' + JSONValue.GetValue<string>('line_type'); end; finally JSONValue.Free; end; end; |
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?
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition