> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List RCS agent test devices

> Lists test devices attached to an RCS agent.



## OpenAPI

````yaml /openapi/source/external/messaging/rcs-registration.json get /rcs/agents/{id}/test_devices
openapi: 3.1.0
info:
  title: Telnyx RCS Registration API
  description: >-
    Create RCS brands and agents, submit them for external review, manage test
    devices, and track carrier launch.
  version: 1.0.0
  contact:
    email: support@telnyx.com
  x-latency-category: responsive
  x-endpoint-cost: light
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: RCS Brands
    description: Manage the legal business entities that operate RCS agents.
  - name: RCS Agents
    description: Manage RCS agent registration, testing, verification, and launch.
paths:
  /rcs/agents/{id}/test_devices:
    get:
      tags:
        - RCS Agents
      summary: List RCS agent test devices
      description: Lists test devices attached to an RCS agent.
      operationId: ListRcsAgentTestDevices
      parameters:
        - $ref: '#/components/parameters/AgentId'
      responses:
        '200':
          description: Test devices attached to the agent.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestDeviceResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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);
            }
        - lang: Python
          source: |
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttestDevices, err := client.Rcs.Agents.TestDevices.List(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", testDevices.Data)\n}\n"
        - lang: Java
          source: |-
            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");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            page = telnyx.rcs.agents.test_devices.list("id")

            puts(page)
        - lang: PHP
          source: >-
            <?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();
            }
        - lang: CLI
          source: |-
            telnyx rcs:agents:test-devices list \
              --api-key 'My API Key' \
              --id id
components:
  parameters:
    AgentId:
      name: id
      in: path
      required: true
      description: The Telnyx-assigned agent identifier.
      schema:
        type: string
        format: uuid
  schemas:
    TestDeviceResponse:
      type: object
      additionalProperties: false
      properties:
        test_device_id:
          type: string
          format: uuid
        phone_number:
          type: string
        invite_status:
          $ref: '#/components/schemas/TestDeviceInviteStatus'
      required:
        - test_device_id
        - phone_number
        - invite_status
      example:
        test_device_id: 44444444-4444-4444-8444-444444444444
        phone_number: '+13125550123'
        invite_status: ACCEPTED
    TestDeviceInviteStatus:
      type: string
      enum:
        - PENDING
        - ACCEPTED
        - DECLINED
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
        errors:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
      example:
        detail: The requested RCS resource was not found.
  responses:
    Unauthorized:
      description: The request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: >-
        The resource does not exist, is not owned by the organization, or the
        provider does not support the requested capability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````