> ## 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 log message

> Retrieve a log message for an external connection associated with your account.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/external-connects.yml get /external_connections/log_messages/{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/log_messages/{id}:
    get:
      tags:
        - External Connections
      summary: Retrieve a log message
      description: >-
        Retrieve a log message for an external connection associated with your
        account.
      operationId: GetExternalConnectionLogMessage
      parameters:
        - $ref: '#/components/parameters/external-voice-integrations_id'
      responses:
        '200':
          $ref: '#/components/responses/GetLogMessageResponse'
        '401':
          description: Unauthorized
        '404':
          description: Resource 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 logMessage = await
            client.externalConnections.logMessages.retrieve('1293384261075731499');


            console.log(logMessage.log_messages);
        - 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
            )
            log_message = client.external_connections.log_messages.retrieve(
                "1293384261075731499",
            )
            print(log_message.log_messages)
        - 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\tlogMessage, err := client.ExternalConnections.LogMessages.Get(context.TODO(), \"1293384261075731499\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", logMessage.LogMessages)\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.logmessages.LogMessageRetrieveParams;

            import
            com.telnyx.sdk.models.externalconnections.logmessages.LogMessageRetrieveResponse;


            public final class Main {
                private Main() {}

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

                    LogMessageRetrieveResponse logMessage = client.externalConnections().logMessages().retrieve("1293384261075731499");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            log_message =
            telnyx.external_connections.log_messages.retrieve("1293384261075731499")


            puts(log_message)
        - lang: CLI
          source: |-
            telnyx external-connections:log-messages retrieve \
              --api-key 'My API Key' \
              --id 1293384261075731499
components:
  parameters:
    external-voice-integrations_id:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1293384261075731499'
        x-format: int64
  responses:
    GetLogMessageResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            title: Get Log Message Response
            properties:
              log_messages:
                type: array
                items:
                  $ref: '#/components/schemas/LogMessage'
                minItems: 1
                maxItems: 1
  schemas:
    LogMessage:
      required:
        - code
        - title
      type: object
      properties:
        code:
          type: string
          example: '10015'
          x-format: int64
        title:
          type: string
          example: Invalid attribute
        detail:
          type: string
          example: >-
            The value provided for the attribute is not valid. Check the value
            used and try again.
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              format: json-pointer
              example: /attribute
        meta:
          type: object
          properties:
            telephone_number:
              type: string
              description: The telephone number the log message is associated with, if any.
              example: '+12345678'
            external_connection_id:
              type: string
              example: '1293384261075731499'
              description: >-
                The external connection the log message is associated with, if
                any.
              x-format: int64
            ticket_id:
              type: string
              format: uuid
              example: 542c3bca-d247-42bc-8fe7-e01d16ecd761
              description: >-
                The ticket ID for an operation that generated the log message,
                if any.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````