Get all possible wireless blocklist values
Retrieve all wireless blocklist values for a given blocklist type. The request returns 422 when type is missing or invalid.
GET
/
wireless_blocklist_values
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const wirelessBlocklistValues = await client.wirelessBlocklistValues.list({ type: 'country' });
console.log(wirelessBlocklistValues.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
wireless_blocklist_values = client.wireless_blocklist_values.list(
type="country",
)
print(wireless_blocklist_values.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
wirelessBlocklistValues, err := client.WirelessBlocklistValues.List(context.TODO(), telnyx.WirelessBlocklistValueListParams{
Type: telnyx.WirelessBlocklistValueListParamsTypeCountry,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", wirelessBlocklistValues.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.wirelessblocklistvalues.WirelessBlocklistValueListParams;
import com.telnyx.sdk.models.wirelessblocklistvalues.WirelessBlocklistValueListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
WirelessBlocklistValueListParams params = WirelessBlocklistValueListParams.builder()
.type(WirelessBlocklistValueListParams.Type.COUNTRY)
.build();
WirelessBlocklistValueListResponse wirelessBlocklistValues = client.wirelessBlocklistValues().list(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
wireless_blocklist_values = telnyx.wireless_blocklist_values.list(type: :country)
puts(wireless_blocklist_values)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$wirelessBlocklistValues = $client->wirelessBlocklistValues->list(
type: 'country'
);
var_dump($wirelessBlocklistValues);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx wireless-blocklist-values list \
--api-key 'My API Key' \
--type countrycurl --request GET \
--url https://api.telnyx.com/v2/wireless_blocklist_values \
--header 'Authorization: Bearer <token>'{
"data": [
{
"country_code": "US"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The Wireless Blocklist type for which to list possible values (e.g., country, mcc, plmn).
Available options:
country, mcc, plmn Example:
"country"
Response
A list of possible wireless blocklist values
- Country · object[]
- Mobile Country Code · object[]
- Public land mobile network · object[]
Show child attributes
Show child attributes
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const wirelessBlocklistValues = await client.wirelessBlocklistValues.list({ type: 'country' });
console.log(wirelessBlocklistValues.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
wireless_blocklist_values = client.wireless_blocklist_values.list(
type="country",
)
print(wireless_blocklist_values.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
wirelessBlocklistValues, err := client.WirelessBlocklistValues.List(context.TODO(), telnyx.WirelessBlocklistValueListParams{
Type: telnyx.WirelessBlocklistValueListParamsTypeCountry,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", wirelessBlocklistValues.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.wirelessblocklistvalues.WirelessBlocklistValueListParams;
import com.telnyx.sdk.models.wirelessblocklistvalues.WirelessBlocklistValueListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
WirelessBlocklistValueListParams params = WirelessBlocklistValueListParams.builder()
.type(WirelessBlocklistValueListParams.Type.COUNTRY)
.build();
WirelessBlocklistValueListResponse wirelessBlocklistValues = client.wirelessBlocklistValues().list(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
wireless_blocklist_values = telnyx.wireless_blocklist_values.list(type: :country)
puts(wireless_blocklist_values)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$wirelessBlocklistValues = $client->wirelessBlocklistValues->list(
type: 'country'
);
var_dump($wirelessBlocklistValues);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx wireless-blocklist-values list \
--api-key 'My API Key' \
--type countrycurl --request GET \
--url https://api.telnyx.com/v2/wireless_blocklist_values \
--header 'Authorization: Bearer <token>'{
"data": [
{
"country_code": "US"
}
]
}