List all Global IP Allowed Ports
List all Global IP Allowed Ports
GET
/
global_ip_allowed_ports
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const globalIPAllowedPorts = await client.globalIPAllowedPorts.list();
console.log(globalIPAllowedPorts.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
)
global_ip_allowed_ports = client.global_ip_allowed_ports.list()
print(global_ip_allowed_ports.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"),
)
globalIPAllowedPorts, err := client.GlobalIPAllowedPorts.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", globalIPAllowedPorts.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.globalipallowedports.GlobalIpAllowedPortListParams;
import com.telnyx.sdk.models.globalipallowedports.GlobalIpAllowedPortListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
GlobalIpAllowedPortListResponse globalIpAllowedPorts = client.globalIpAllowedPorts().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
global_ip_allowed_ports = telnyx.global_ip_allowed_ports.list
puts(global_ip_allowed_ports)<?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 {
$globalIPAllowedPorts = $client->globalIPAllowedPorts->list();
var_dump($globalIPAllowedPorts);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx global-ip-allowed-ports list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/global_ip_allowed_ports \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "global_ip_allowed_port",
"protocol_code": "tcp",
"name": "TCP Registered",
"first_port": 1024,
"last_port": 49151
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const globalIPAllowedPorts = await client.globalIPAllowedPorts.list();
console.log(globalIPAllowedPorts.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
)
global_ip_allowed_ports = client.global_ip_allowed_ports.list()
print(global_ip_allowed_ports.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"),
)
globalIPAllowedPorts, err := client.GlobalIPAllowedPorts.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", globalIPAllowedPorts.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.globalipallowedports.GlobalIpAllowedPortListParams;
import com.telnyx.sdk.models.globalipallowedports.GlobalIpAllowedPortListResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
GlobalIpAllowedPortListResponse globalIpAllowedPorts = client.globalIpAllowedPorts().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
global_ip_allowed_ports = telnyx.global_ip_allowed_ports.list
puts(global_ip_allowed_ports)<?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 {
$globalIPAllowedPorts = $client->globalIPAllowedPorts->list();
var_dump($globalIPAllowedPorts);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx global-ip-allowed-ports list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/global_ip_allowed_ports \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "global_ip_allowed_port",
"protocol_code": "tcp",
"name": "TCP Registered",
"first_port": 1024,
"last_port": 49151
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}