Comprar un Numbers

Necesitas comprar un Vonage número virtual si quieres:

  • Hacer o recibir llamadas telefónicas con el Voice API
  • Recibir SMS entrantes con el SMS API
  • Utilice la mensajería multicanal con el Messages API

Esta página muestra cómo comprar un número mediante programación.

También puede anular un número en línea, a través de la página panel de control para desarrolladores o desde la línea de comandos, utilizando la opción CLI de Vonage.

Sustituya las siguientes variables del código de ejemplo por sus propios valores:

ClaveDescripción
VONAGE_API_KEY

Your Vonage API key (see it on your dashboard).

VONAGE_API_SECRET

Your Vonage API secret (also available on your dashboard).

COUNTRY_CODE

The two digit country code for the number. For example: GB for the United Kingdom

VONAGE_NUMBER

Your Vonage Number. E.g. 447700900000

Escriba el código

Añada lo siguiente a buy-number.sh:

curl -X POST \
  "https://rest.nexmo.com/number/buy?api_key=$VONAGE_API_KEY&api_secret=$VONAGE_API_SECRET" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "country=${COUNTRY_CODE}&msisdn=${VONAGE_NUMBER}"

Ver fuente completa

Ejecute su código

Guarde este archivo en su máquina y ejecútelo:

sh buy-number.sh

Ver también