This endpoint allows Add-on Listing users to fetch an Extension or view a list of Extensions associated with an assigned Add-on Listing of a Twilio phone number.
When an Add-on Listing is assigned to a Twilio phone number, it is only invoked for communications associated with that phone number rather than the entire Account.
This API only supports Add-on Listings that are in General Availability (GA) or Beta state. Listings that are labeled as Coming Soon or Developer Preview are not accessible via the API and must be managed in the Console.
The unique string that that we created to identify the resource.
^XF[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to which the Add-on is assigned.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID that uniquely identifies the assigned Add-on installation.
^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
A string that you assigned to describe the Product this Extension is used within.
An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid
in the URL to address the resource.
Whether the Extension will be invoked.
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json
The SID of the Account that created the resource to fetch.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to which the Add-on is assigned.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID that uniquely identifies the assigned Add-on installation.
^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the resource to fetch.
^XF[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchIncomingPhoneNumberAssignedAddOnExtension() {11const extension = await client12.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")15.fetch();1617console.log(extension.sid);18}1920fetchIncomingPhoneNumberAssignedAddOnExtension();
1{2"sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"assigned_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"friendly_name": "Incoming Voice Call",7"product_name": "Programmable Voice",8"unique_name": "voice-incoming",9"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",10"enabled": true11}
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json
The SID of the Account that created the resources to read.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to which the Add-on is assigned.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID that uniquely identifies the assigned Add-on installation.
^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listIncomingPhoneNumberAssignedAddOnExtension() {11const extensions = await client12.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.extensions.list({ limit: 20 });1516extensions.forEach((e) => console.log(e.sid));17}1819listIncomingPhoneNumberAssignedAddOnExtension();
1{2"end": 0,3"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json?PageSize=50&Page=0",4"next_page_uri": null,5"page": 0,6"page_size": 50,7"previous_page_uri": null,8"extensions": [9{10"sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",11"assigned_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",14"friendly_name": "Incoming Voice Call",15"product_name": "Programmable Voice",16"unique_name": "voice-incoming",17"enabled": true,18"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"19}20],21"start": 0,22"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json?PageSize=50&Page=0"23}