List Your Numbers

This page shows you how to list the numbers that you own programmatically.

You can also view your numbers online, using the developer dashboard or from the command line, using the Vonage CLI.

Replace the following variables in the sample code with your own values:

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

NUMBER_SEARCH_CRITERIA

The filter criteria. For example, numbers containing 234.

NUMBER_SEARCH_PATTERN

Where the NUMBER_SEARCH_CRITERIA should appear in the number:

  • 0 - At the beginning of the number
  • 1- Anywhere in the number
  • 2 - At the end of the number

Write the code

Add the following to list-numbers.sh:

View full source

Run your code

Save this file to your machine and run it:

sh list-numbers.sh

See also