Number Insight Standard
The Number Insight Standard API provides all the information from the Number Insight Basic API together with the following additional data:
- The line type (mobile/landline/virtual number/premium/toll-free)
- The Mobile Country Code (MCC) and Mobile Network Code (MNC)
- The name of the caller (USA only)
Use this information to determine the best type of communication for a number (SMS or voice) and block virtual numbers.
Before attempting to run the code examples, replace the variable placeholders:
| Key | Description |
|---|---|
VONAGE_API_KEY | Your Vonage API key (see it on your dashboard). |
VONAGE_API_SECRET | Your Vonage API secret (also available on your dashboard). |
INSIGHT_NUMBER | The number you want to retrieve insight information for. |
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named ni-standard.js and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
Add the following to build.gradle:
Create a file named StandardInsight and add the following code to the main method:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.kt.numberinsight with the package containing StandardInsight:
Prerequisites
Add the following to build.gradle:
Create a file named StandardInsight and add the following code to the main method:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.insight with the package containing StandardInsight:
Prerequisites
Create a file named StandardInsights.cs and add the following code:
Add the following to StandardInsights.cs:
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named ni-standard.rb and add the following code:
Run your code
Save this file to your machine and run it:
The response from the API contains the following data:
For a description of each returned field and to see all possible values, see the Number Insights API documentation