Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

DialingPermissions Country Resource


Voice dialing permissions are organized by country and identified by the country's ISO(link takes you to an external page) code.


DialingPermissions Country properties

dialingpermissions-country-properties page anchor
Resource properties
iso_codetype: string<ISO COUNTRY CODE>Not PII

nametype: stringNot PII

The name of the country.


continenttype: stringNot PII

The name of the continent in which the country is located.


country_codestype: string[]Not PII

low_risk_numbers_enabledtype: booleanNot PII

Whether dialing to low-risk numbers is enabled.


high_risk_special_numbers_enabledtype: booleanNot PII

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


high_risk_tollfraud_numbers_enabledtype: booleanNot PII

Whether dialing to high-risk toll fraud(link takes you to an external page) 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(link takes you to an external page). 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


urltype: string<URI>Not PII

The absolute URL of this resource.


linkstype: object<URI MAP>Not PII

A list of URLs related to this resource.


Fetch a DialingPermissions Country resource

fetch-a-dialingpermissions-country-resource page anchor
GET https://voice.twilio.com/v1/DialingPermissions/Countries/{IsoCode}

Parameters

fetch-parameters page anchor
URI parameters
IsoCodetype: string<ISO COUNTRY CODE>Not PII
Path Parameter

The ISO country code(link takes you to an external page) of the DialingPermissions Country resource to fetch

Fetch a DialingPermissions Country resource

fetch-a-dialingpermissions-country-resource-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.voice.v1.dialingPermissions
_11
.countries('US')
_11
.fetch()
_11
.then(country => console.log(country.name));

Output

_15
{
_15
"iso_code": "US",
_15
"name": "United States/Canada",
_15
"country_codes": [
_15
"+1"
_15
],
_15
"continent": "NORTH_AMERICA",
_15
"low_risk_numbers_enabled": false,
_15
"high_risk_special_numbers_enabled": false,
_15
"high_risk_tollfraud_numbers_enabled": false,
_15
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/US",
_15
"links": {
_15
"highrisk_special_prefixes": "https://voice.twilio.com/v1/DialingPermissions/Countries/US/HighRiskSpecialPrefixes"
_15
}
_15
}


Read multiple DialingPermissions Country resources

read-multiple-dialingpermissions-country-resources page anchor
GET https://voice.twilio.com/v1/DialingPermissions/Countries

URI parameters
IsoCodetype: string<ISO COUNTRY CODE>Not PII
Query Parameter

Filter to retrieve the country permissions by specifying the ISO country code(link takes you to an external page)


Continenttype: stringNot PII
Query Parameter

Filter to retrieve the country permissions by specifying the continent


CountryCodetype: stringNot PII
Query Parameter

LowRiskNumbersEnabledtype: booleanNot PII
Query Parameter

Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: true or false.


HighRiskSpecialNumbersEnabledtype: booleanNot PII
Query Parameter

Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: true or false


HighRiskTollfraudNumbersEnabledtype: booleanNot PII
Query Parameter

Filter to retrieve the country permissions with dialing to high-risk toll fraud(link takes you to an external page) numbers enabled. Can be: true or false.


PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Read multiple DialingPermissions Country resources

read-multiple-dialingpermissions-country-resources-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.voice.v1.dialingPermissions
_11
.countries
_11
.list({limit: 20})
_11
.then(countries => countries.forEach(c => console.log(c.name)));

Output

_28
{
_28
"content": [
_28
{
_28
"iso_code": "US",
_28
"name": "United States/Canada",
_28
"country_codes": [
_28
"+1"
_28
],
_28
"continent": "NORTH_AMERICA",
_28
"low_risk_numbers_enabled": false,
_28
"high_risk_special_numbers_enabled": false,
_28
"high_risk_tollfraud_numbers_enabled": false,
_28
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/US",
_28
"links": {
_28
"highrisk_special_prefixes": "https://voice.twilio.com/v1/DialingPermissions/Countries/US/HighRiskSpecialPrefixes"
_28
}
_28
}
_28
],
_28
"meta": {
_28
"first_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries?IsoCode=US&PageSize=50&Page=0",
_28
"key": "content",
_28
"next_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries?IsoCode=US&PageSize=50&Page=1",
_28
"page": 0,
_28
"page_size": 50,
_28
"previous_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries?IsoCode=US&PageSize=50&Page=0",
_28
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries?IsoCode=US&PageSize=50&Page=0"
_28
}
_28
}


Rate this page: