Join us in San Francisco on the 29/30th of October for two days of developer workshops and technical talks

Retrieve Details of a Specific Extension

This example shows you how to use the Extension API to retrieve details about a specific extension associated with an account.

Replace the following placeholders in the example with your own details:

Write the code

Add the following to get-extension.sh:

Copy to Clipboard
curl -H "Authorization: Bearer $VBC_TOKEN" \
  https://api.vonage.com/t/vbc.prod/provisioning/api/accounts/$VBC_ACCOUNT_ID/extensions/$VBC_EXTENSION

View full source

Run your code

Save this file to your machine and run it:

bash get-extension.sh

The response is a JSON object containing details about the extension. See the API documentation for descriptions of the fields in the response.

{
   "_links":{
      "self":{
         "href":".../accounts/9999999/extensions/2222"
      }
   },
   "_embedded":{
      "extension":{
         "extension_number":"2222",
         "location_id":1111111,
         "vtt_enabled":false,
         "dnd_enabled":true,
         "caller_id":"14155550100",
         "block_caller_id":false,
         "dids":[

         ],
         "extension_handsets":[

         ]
      }
   }
}