JavaScript

Configure your prerequisites

There are a few prerequisites that you need to complete before you can work through this tutorial. If you've already completed any of them, feel free to skip that step.

You can create a Vonage account via the Dashboard.

Within the Dashboard you can create Applications and purchase Vonage numbers. You can also perform these tasks using the Vonage CLI.

If you want to carry out tasks such as creating applications, purchasing Vonage numbers and so on, you will need to install the Vonage CLI. As the Vonage CLI requires node.js you will need to install node.js first.

To make sure node.js is installed, please run the following command in the terminal:

node -v

Follow the steps outlined on the Getting Started with Vonage CLI page to install and configure the command line.

Using the Dashboard

First you can browse your existing numbers.

If you have no spare numbers you can buy one.

Using the Vonage CLI

Once you have found a number you are satisfied with, you can purchase that using the vonage numbers buy command:

vonage numbers buy US 16127779311 
βœ… Searching for numbers
Are you sure you want to purchase the number 16127779311 for €0.90? [y/n] y

βœ… Purchasing number
Number 16127779311 purchased

Number: 16127779311 
Country: πŸ‡ΊπŸ‡Έ United States
Type: Mobile
Features: MMS, SMS, VOICE
Monthly Cost: €0.90
Setup Cost: €0.00
Linked Application ID: Not linked to any application
Voice Callback: Not Set
Voice Callback Value: Not Set
Voice Status Callback: Not Set