List RCS agent test devices
Lists test devices attached to an RCS agent.
GET
/
rcs
/
agents
/
{id}
/
test_devices
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.rcs.agents.testDevices.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.rcs.agents.test_devices.list(
"id",
)
print(page)
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"),
)
testDevices, err := client.Rcs.Agents.TestDevices.List(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", testDevices.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.rcs().agents().testDevices().list("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.rcs.agents.test_devices.list("id")
puts(page)<?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 {
$page = $client->rcs->agents->testDevices->list(
'id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx rcs:agents:test-devices list \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/rcs/agents/{id}/test_devices \
--header 'Authorization: Bearer <token>'[
{
"test_device_id": "44444444-4444-4444-8444-444444444444",
"phone_number": "+13125550123",
"invite_status": "ACCEPTED"
}
]{
"detail": "The requested RCS resource was not found."
}{
"detail": "The requested RCS resource was not found."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Telnyx-assigned agent identifier.
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
});
// Automatically fetches more pages as needed.
for await (const response of client.rcs.agents.testDevices.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.rcs.agents.test_devices.list(
"id",
)
print(page)
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"),
)
testDevices, err := client.Rcs.Agents.TestDevices.List(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", testDevices.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.rcs().agents().testDevices().list("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.rcs.agents.test_devices.list("id")
puts(page)<?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 {
$page = $client->rcs->agents->testDevices->list(
'id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx rcs:agents:test-devices list \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/rcs/agents/{id}/test_devices \
--header 'Authorization: Bearer <token>'[
{
"test_device_id": "44444444-4444-4444-8444-444444444444",
"phone_number": "+13125550123",
"invite_status": "ACCEPTED"
}
]{
"detail": "The requested RCS resource was not found."
}{
"detail": "The requested RCS resource was not found."
}