Number Insight Basic

Use the Vonage Number Insight Basic API to determine:

  • The country where a number is registered
  • The local and international representation of that number

This can help you present numbers to your users in the correct format for their locale.

Before attempting to run the code examples, replace the variable placeholders:

KeyDescription
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.

Write the code

Add the following to ni-basic.sh:

View full source

Run your code

Save this file to your machine and run it:

sh ni-basic.sh

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