List available carriers in the UK
List available carriers in the UK.
GET
/
porting
/
uk_carriers
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.porting.listUkCarriers();
console.log(response.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
)
response = client.porting.list_uk_carriers()
print(response.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"),
)
response, err := client.Porting.ListUkCarriers(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.porting.PortingListUkCarriersParams;
import com.telnyx.sdk.models.porting.PortingListUkCarriersResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
PortingListUkCarriersResponse response = client.porting().listUkCarriers();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.porting.list_uk_carriers
puts(response)<?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 {
$response = $client->porting->listUkCarriers();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx porting list-uk-carriers \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/porting/uk_carriers \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
"cupid": "895",
"name": "Telnyx UK Limited",
"alternative_cupids": [
"895"
],
"record_type": "porting_uk_carrier",
"created_at": "2021-03-19T10:07:15.527000Z",
"updated_at": "2021-03-19T10:07:15.527000Z"
}
]
}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 response = await client.porting.listUkCarriers();
console.log(response.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
)
response = client.porting.list_uk_carriers()
print(response.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"),
)
response, err := client.Porting.ListUkCarriers(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.porting.PortingListUkCarriersParams;
import com.telnyx.sdk.models.porting.PortingListUkCarriersResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
PortingListUkCarriersResponse response = client.porting().listUkCarriers();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.porting.list_uk_carriers
puts(response)<?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 {
$response = $client->porting->listUkCarriers();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx porting list-uk-carriers \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/porting/uk_carriers \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
"cupid": "895",
"name": "Telnyx UK Limited",
"alternative_cupids": [
"895"
],
"record_type": "porting_uk_carrier",
"created_at": "2021-03-19T10:07:15.527000Z",
"updated_at": "2021-03-19T10:07:15.527000Z"
}
]
}