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 code.


DialingPermissions Country properties

Property nameTypePIIDescription
iso_codestring<iso-country-code>
Not PII

namestring

The name of the country.


continentstring

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


country_codesarray[string]

The E.164 assigned country codes(s)


low_risk_numbers_enabledboolean

Whether dialing to low-risk numbers is enabled.


high_risk_special_numbers_enabledboolean

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_enabledboolean

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


urlstring<uri>

The absolute URL of this resource.


linksobject<uri-map>

A list of URLs related to this resource.


Fetch a DialingPermissions Country resource

GET https://voice.twilio.com/v1/DialingPermissions/Countries/{IsoCode}

Path parameters

Property nameTypeRequiredPIIDescription
IsoCodestring<iso-country-code>required

The ISO country code of the DialingPermissions Country resource to fetch

Fetch a DialingPermissions Country resource

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function fetchDialingPermissionsCountry() {
_18
const country = await client.voice.v1.dialingPermissions
_18
.countries("US")
_18
.fetch();
_18
_18
console.log(country.isoCode);
_18
}
_18
_18
fetchDialingPermissionsCountry();

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

GET https://voice.twilio.com/v1/DialingPermissions/Countries

Query parameters

Property nameTypeRequiredPIIDescription
IsoCodestring<iso-country-code>Optional

Filter to retrieve the country permissions by specifying the ISO country code


ContinentstringOptional

Filter to retrieve the country permissions by specifying the continent


CountryCodestringOptional

Filter the results by specified country codes


LowRiskNumbersEnabledbooleanOptional

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


HighRiskSpecialNumbersEnabledbooleanOptional

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


HighRiskTollfraudNumbersEnabledbooleanOptional

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


PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

Read multiple DialingPermissions Country resources

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listDialingPermissionsCountry() {
_18
const countries = await client.voice.v1.dialingPermissions.countries.list({
_18
limit: 20,
_18
});
_18
_18
countries.forEach((c) => console.log(c.isoCode));
_18
}
_18
_18
listDialingPermissionsCountry();

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": null,
_28
"page": 0,
_28
"page_size": 50,
_28
"previous_page_url": null,
_28
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries?IsoCode=US&PageSize=50&Page=0"
_28
}
_28
}


Rate this page: