Skip to contentSkip to navigationSkip to topbar
On this page

DialingPermissions HighRiskSpecialPrefix Resource


Returns the list of high-risk prefixes for a country.


DialingPermissions HighRiskSpecialPrefix properties

dialingpermissions-highriskspecialprefix-properties page anchor
Property nameTypeRequiredDescriptionChild properties
prefixstringOptional
Not PII

A prefix is a contiguous number range for a block of E.164 numbers that includes the E.164 assigned country code. For example, a North American Numbering Plan prefix like +1510720 written like +1(510) 720 matches all numbers inclusive from +1(510) 720-0000 to +1(510) 720-9999.


Read multiple DialingPermissions HighRiskSpecialPrefix resources

read-multiple-dialingpermissions-highriskspecialprefix-resources page anchor
GET https://voice.twilio.com/v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
IsoCodestring<iso-country-code>required
Property nameTypeRequiredPIIDescription
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 HighRiskSpecialPrefix resourcesLink to code sample: Read multiple DialingPermissions HighRiskSpecialPrefix resources
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listDialingPermissionsHrsPrefixes() {
11
const highriskSpecialPrefixes = await client.voice.v1.dialingPermissions
12
.countries("LV")
13
.highriskSpecialPrefixes.list({ limit: 20 });
14
15
highriskSpecialPrefixes.forEach((h) => console.log(h.prefix));
16
}
17
18
listDialingPermissionsHrsPrefixes();

Output

1
{
2
"content": [
3
{
4
"prefix": "+37181"
5
},
6
{
7
"prefix": "+3719000"
8
}
9
],
10
"meta": {
11
"first_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries/LV/HighRiskSpecialPrefixes?PageSize=50&Page=0",
12
"key": "content",
13
"next_page_url": null,
14
"page": 0,
15
"page_size": 50,
16
"previous_page_url": null,
17
"url": "https://voice.twilio.com/v1/DialingPermissions/Countries/LV/HighRiskSpecialPrefixes?PageSize=50&Page=0"
18
}
19
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.