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

# Get SIM card public IP definition

> It returns the public IP requested for a SIM card.




## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/wireless/sim-cards-configuration.yml get /sim_cards/{id}/public_ip
openapi: 3.1.0
info:
  title: SIM Cards Configuration API
  version: 2.0.0
  description: >-
    Network configuration for SIM cards including public IP management, private
    wireless gateways, blocklists, traffic policy profiles, and data usage
    notifications.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /sim_cards/{id}/public_ip:
    get:
      tags:
        - SIM Cards
      summary: Get SIM card public IP definition
      description: |
        It returns the public IP requested for a SIM card.
      operationId: GetSimCardPublicIp
      parameters:
        - $ref: '#/components/parameters/SIMCardId'
      responses:
        '200':
          $ref: '#/components/responses/SIMCardPublicIPResponse'
        '401':
          description: Unauthorized
        default:
          $ref: '#/components/responses/wireless_GenericErrorResponse'
      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 response = await
            client.simCards.getPublicIP('6a09cdc3-8948-47f0-aa62-74ac943d6c58');


            console.log(response.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
            )
            response = client.sim_cards.get_public_ip(
                "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
            )
            print(response.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\tresponse, err := client.SimCards.GetPublicIP(context.TODO(), \"6a09cdc3-8948-47f0-aa62-74ac943d6c58\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.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.simcards.SimCardGetPublicIpParams;
            import com.telnyx.sdk.models.simcards.SimCardGetPublicIpResponse;

            public final class Main {
                private Main() {}

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

                    SimCardGetPublicIpResponse response = client.simCards().getPublicIp("6a09cdc3-8948-47f0-aa62-74ac943d6c58");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.sim_cards.get_public_ip("6a09cdc3-8948-47f0-aa62-74ac943d6c58")


            puts(response)
        - lang: CLI
          source: |-
            telnyx sim-cards get-public-ip \
              --api-key 'My API Key' \
              --id 6a09cdc3-8948-47f0-aa62-74ac943d6c58
components:
  parameters:
    SIMCardId:
      name: id
      description: Identifies the SIM.
      in: path
      required: true
      schema:
        format: uuid
        type: string
        example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
  responses:
    SIMCardPublicIPResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/SIMCardPublicIP'
    wireless_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/wireless_Errors'
  schemas:
    SIMCardPublicIP:
      type: object
      title: SIMCardPublicIP
      properties:
        record_type:
          type: string
          example: sim_card_public_ip
          readOnly: true
        region_code:
          type: string
          example: dc2
          readOnly: true
        sim_card_id:
          type: string
          format: uuid
          example: 6b14e151-8493-4fa1-8664-1cc4e6d14158
        type:
          type: string
          enum:
            - ipv4
          default: ipv4
          example: ipv4
          readOnly: true
        ip:
          type: string
          description: >-
            The provisioned IP address. This attribute will only be available
            when underlying resource status is in a "provisioned" status.
          example: 192.168.0.0
          readOnly: true
          default: null
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            updated.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
    wireless_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/wireless_Error'
      type: object
    wireless_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````