Voice dialing permissions are organized by country and identified by the country's ISO code.
Whether dialing to high-risk special services numbers is enabled. These prefixes include number ranges allocated by the country and include premium numbers, special services, shared cost, and others
Whether dialing to high-risk toll fraud numbers is enabled. These prefixes include narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks, also known as toll fraud. These prefixes are collected from anti-fraud databases and verified by analyzing calls on our network. These prefixes are not available for download and are updated frequently
A list of URLs related to this resource.
GET https://voice.twilio.com/v1/DialingPermissions/Countries/{IsoCode}
The ISO country code of the DialingPermissions Country resource to fetch
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 fetchDialingPermissionsCountry() {11const country = await client.voice.v1.dialingPermissions12.countries("US")13.fetch();1415console.log(country.isoCode);16}1718fetchDialingPermissionsCountry();
1{2"iso_code": "US",3"name": "United States/Canada",4"country_codes": [5"+1"6],7"continent": "NORTH_AMERICA",8"low_risk_numbers_enabled": false,9"high_risk_special_numbers_enabled": false,10"high_risk_tollfraud_numbers_enabled": false,11"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/US",12"links": {13"highrisk_special_prefixes": "https://voice.twilio.com/v1/DialingPermissions/Countries/US/HighRiskSpecialPrefixes"14}15}
GET https://voice.twilio.com/v1/DialingPermissions/Countries
Filter to retrieve the country permissions by specifying the ISO country code
Filter to retrieve the country permissions by specifying the continent
Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: true
or false
.
Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: true
or false
Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled. Can be: true
or false
.
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 listDialingPermissionsCountry() {11const countries = await client.voice.v1.dialingPermissions.countries.list({12limit: 20,13});1415countries.forEach((c) => console.log(c.isoCode));16}1718listDialingPermissionsCountry();
1{2"content": [3{4"iso_code": "US",5"name": "United States/Canada",6"country_codes": [7"+1"8],9"continent": "NORTH_AMERICA",10"low_risk_numbers_enabled": false,11"high_risk_special_numbers_enabled": false,12"high_risk_tollfraud_numbers_enabled": false,13"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/US",14"links": {15"highrisk_special_prefixes": "https://voice.twilio.com/v1/DialingPermissions/Countries/US/HighRiskSpecialPrefixes"16}17}18],19"meta": {20"first_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries?IsoCode=US&PageSize=50&Page=0",21"key": "content",22"next_page_url": null,23"page": 0,24"page_size": 50,25"previous_page_url": null,26"url": "https://voice.twilio.com/v1/DialingPermissions/Countries?IsoCode=US&PageSize=50&Page=0"27}28}