import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.simCards.getPublicIP('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(response.data);{
"data": {
"record_type": "sim_card_public_ip",
"region_code": "dc2",
"sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
"type": "ipv4",
"ip": "192.168.0.0",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}It returns the public IP requested for a SIM card.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.simCards.getPublicIP('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(response.data);{
"data": {
"record_type": "sim_card_public_ip",
"region_code": "dc2",
"sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
"type": "ipv4",
"ip": "192.168.0.0",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Identifies the SIM.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Successful response
Show child attributes
"sim_card_public_ip"
"dc2"
"6b14e151-8493-4fa1-8664-1cc4e6d14158"
ipv4 "ipv4"
The provisioned IP address. This attribute will only be available when underlying resource status is in a "provisioned" status.
"192.168.0.0"
ISO 8601 formatted date-time indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date-time indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
Was this page helpful?