> ## 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.

# Retrieve a phone number

> Return the details of a phone number associated with the given external connection.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/external-connects.yml get /external_connections/{id}/phone_numbers/{phone_number_id}
openapi: 3.1.0
info:
  title: Telnyx External Connects API
  version: 2.0.0
  description: API for External connects.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /external_connections/{id}/phone_numbers/{phone_number_id}:
    get:
      tags:
        - External Connections
      summary: Retrieve a phone number
      description: >-
        Return the details of a phone number associated with the given external
        connection.
      operationId: GetExternalConnectionPhoneNumber
      parameters:
        - $ref: '#/components/parameters/external-voice-integrations_id'
        - $ref: '#/components/parameters/phone_number_id'
      responses:
        '200':
          $ref: '#/components/responses/GetExternalConnectionPhoneNumberResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      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
            });


            const phoneNumber = await
            client.externalConnections.phoneNumbers.retrieve('1234567889', {
              id: '1293384261075731499',
            });


            console.log(phoneNumber.data);
        - 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
            )
            phone_number = client.external_connections.phone_numbers.retrieve(
                phone_number_id="1234567889",
                id="1293384261075731499",
            )
            print(phone_number.data)
        - 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\tphoneNumber, err := client.ExternalConnections.PhoneNumbers.Get(\n\t\tcontext.TODO(),\n\t\t\"1234567889\",\n\t\ttelnyx.ExternalConnectionPhoneNumberGetParams{\n\t\t\tID: \"1293384261075731499\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", phoneNumber.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.externalconnections.phonenumbers.PhoneNumberRetrieveParams;

            import
            com.telnyx.sdk.models.externalconnections.phonenumbers.PhoneNumberRetrieveResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    PhoneNumberRetrieveParams params = PhoneNumberRetrieveParams.builder()
                        .id("1293384261075731499")
                        .phoneNumberId("1234567889")
                        .build();
                    PhoneNumberRetrieveResponse phoneNumber = client.externalConnections().phoneNumbers().retrieve(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            phone_number =
            telnyx.external_connections.phone_numbers.retrieve("1234567889", id:
            "1293384261075731499")


            puts(phone_number)
        - lang: CLI
          source: |-
            telnyx external-connections:phone-numbers retrieve \
              --api-key 'My API Key' \
              --id 1293384261075731499 \
              --phone-number-id 1234567889
components:
  parameters:
    external-voice-integrations_id:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1293384261075731499'
        x-format: int64
    phone_number_id:
      name: phone_number_id
      description: A phone number's ID via the Telnyx API
      in: path
      required: true
      schema:
        type: string
        example: '1234567889'
  responses:
    GetExternalConnectionPhoneNumberResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            title: Get External Connection Phone Number Response
            properties:
              data:
                $ref: '#/components/schemas/ExternalConnectionPhoneNumber'
  schemas:
    ExternalConnectionPhoneNumber:
      type: object
      title: Phone number details with relation to an external connection
      properties:
        ticket_id:
          $ref: '#/components/schemas/UUID'
        telephone_number:
          type: string
          description: Phone number in E164 format.
        number_id:
          type: string
          description: Phone number ID from the Telnyx API.
        civic_address_id:
          type: string
          format: uuid
          description: Identifies the civic address assigned to the phone number.
        location_id:
          type: string
          format: uuid
          description: Identifies the location assigned to the phone number.
        displayed_country_code:
          type: string
          description: >-
            The iso country code that will be displayed to the user when they
            receive a call from this phone number.
        acquired_capabilities:
          type: array
          items:
            type: string
            enum:
              - FirstPartyAppAssignment
              - InboundCalling
              - Office365
              - OutboundCalling
              - UserAssignment
            description: >-
              The capabilities that are available for this phone number on
              Microsoft Teams.
    UUID:
      title: UUID
      type: string
      format: uuid
      description: Uniquely identifies the resource.
      example: 542c3bca-d247-42bc-8fe7-e01d16ecd761
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````