# Dialing Permissions - HighRiskSpecialPrefixes subresource

HighRiskSpecialPrefixes is a subresource of [Countries](/docs/voice/api/dialingpermissions-country-resource) and represents a list of high-risk prefixes for a specific country.

## HighRiskSpecialPrefixes properties

```json
{"type":"object","refName":"voice.v1.dialing_permissions.dialing_permissions_country.dialing_permissions_hrs_prefixes","modelName":"voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes","properties":{"prefix":{"type":"string","nullable":true,"description":"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`."}}}
```

## Retrieve a list of HighRiskSpecialPrefixes

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

### Path parameters

```json
[{"name":"IsoCode","in":"path","description":"The [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to identify the country permissions from which high-risk special service number prefixes are fetched","schema":{"type":"string","format":"iso-country-code"},"required":true}]
```

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

Read multiple DialingPermissions HighRiskSpecialPrefix resources

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listDialingPermissionsHrsPrefixes() {
  const highriskSpecialPrefixes = await client.voice.v1.dialingPermissions
    .countries("LV")
    .highriskSpecialPrefixes.list({ limit: 20 });

  highriskSpecialPrefixes.forEach((h) => console.log(h.prefix));
}

listDialingPermissionsHrsPrefixes();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

highrisk_special_prefixes = client.voice.v1.dialing_permissions.countries(
    "LV"
).highrisk_special_prefixes.list(limit=20)

for record in highrisk_special_prefixes:
    print(record.prefix)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Voice.V1.DialingPermissions.Country;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var highriskSpecialPrefixes =
            await HighriskSpecialPrefixResource.ReadAsync(pathIsoCode: "LV", limit: 20);

        foreach (var record in highriskSpecialPrefixes) {
            Console.WriteLine(record.Prefix);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.voice.v1.dialingpermissions.country.HighriskSpecialPrefix;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<HighriskSpecialPrefix> highriskSpecialPrefixes =
            HighriskSpecialPrefix.reader("LV").limit(20).read();

        for (HighriskSpecialPrefix record : highriskSpecialPrefixes) {
            System.out.println(record.getPrefix());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	voice "github.com/twilio/twilio-go/rest/voice/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &voice.ListDialingPermissionsHrsPrefixesParams{}
	params.SetLimit(20)

	resp, err := client.VoiceV1.ListDialingPermissionsHrsPrefixes("LV",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Prefix != nil {
				fmt.Println(*resp[record].Prefix)
			} else {
				fmt.Println(resp[record].Prefix)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$highriskSpecialPrefixes = $twilio->voice->v1->dialingPermissions
    ->countries("LV")
    ->highriskSpecialPrefixes->read(20);

foreach ($highriskSpecialPrefixes as $record) {
    print $record->prefix;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

highrisk_special_prefixes = @client
                            .voice
                            .v1
                            .dialing_permissions
                            .countries('LV')
                            .highrisk_special_prefixes
                            .list(limit: 20)

highrisk_special_prefixes.each do |record|
   puts record.prefix
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:voice:v1:dialing-permissions:countries:high-risk-special-prefixes:list \
   --iso-code LV
```

```bash
curl -X GET "https://voice.twilio.com/v1/DialingPermissions/Countries/LV/HighRiskSpecialPrefixes?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "content": [
    {
      "prefix": "+37181"
    },
    {
      "prefix": "+3719000"
    }
  ],
  "meta": {
    "first_page_url": "https://voice.twilio.com/v1/DialingPermissions/Countries/LV/HighRiskSpecialPrefixes?PageSize=50&Page=0",
    "key": "content",
    "next_page_url": null,
    "page": 0,
    "page_size": 50,
    "previous_page_url": null,
    "url": "https://voice.twilio.com/v1/DialingPermissions/Countries/LV/HighRiskSpecialPrefixes?PageSize=50&Page=0"
  }
}
```
