Retrieve an access IP address
GET
/
access_ip_address
/
{access_ip_address_id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const accessIPAddressResponse = await client.accessIPAddress.retrieve('access_ip_address_id');
console.log(accessIPAddressResponse.id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
access_ip_address_response = client.access_ip_address.retrieve(
"access_ip_address_id",
)
print(access_ip_address_response.id)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"),
)
accessIPAddressResponse, err := client.AccessIPAddress.Get(context.TODO(), "access_ip_address_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", accessIPAddressResponse.ID)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.accessipaddress.AccessIpAddressResponse;
import com.telnyx.sdk.models.accessipaddress.AccessIpAddressRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AccessIpAddressResponse accessIpAddressResponse = client.accessIpAddress().retrieve("access_ip_address_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
access_ip_address_response = telnyx.access_ip_address.retrieve("access_ip_address_id")
puts(access_ip_address_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 {
$accessIPAddressResponse = $client->accessIPAddress->retrieve(
'access_ip_address_id'
);
var_dump($accessIPAddressResponse);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx access-ip-address retrieve \
--api-key 'My API Key' \
--access-ip-address-id access_ip_address_idcurl --request GET \
--url https://api.telnyx.com/v2/access_ip_address/{access_ip_address_id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"ip_address": "<string>",
"source": "<string>",
"user_id": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the access ip address.
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 accessIPAddressResponse = await client.accessIPAddress.retrieve('access_ip_address_id');
console.log(accessIPAddressResponse.id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
access_ip_address_response = client.access_ip_address.retrieve(
"access_ip_address_id",
)
print(access_ip_address_response.id)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"),
)
accessIPAddressResponse, err := client.AccessIPAddress.Get(context.TODO(), "access_ip_address_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", accessIPAddressResponse.ID)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.accessipaddress.AccessIpAddressResponse;
import com.telnyx.sdk.models.accessipaddress.AccessIpAddressRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AccessIpAddressResponse accessIpAddressResponse = client.accessIpAddress().retrieve("access_ip_address_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
access_ip_address_response = telnyx.access_ip_address.retrieve("access_ip_address_id")
puts(access_ip_address_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 {
$accessIPAddressResponse = $client->accessIPAddress->retrieve(
'access_ip_address_id'
);
var_dump($accessIPAddressResponse);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx access-ip-address retrieve \
--api-key 'My API Key' \
--access-ip-address-id access_ip_address_idcurl --request GET \
--url https://api.telnyx.com/v2/access_ip_address/{access_ip_address_id} \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"ip_address": "<string>",
"source": "<string>",
"user_id": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}