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 simpleSimCard of client.simCards.list()) {
console.log(simpleSimCard.id);
}{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card",
"status": {
"value": "enabled",
"reason": "The SIM card is active, ready to connect to networks and consume data."
},
"type": "physical",
"iccid": "89310410106543789301",
"imsi": "081932214823362973",
"msisdn": "+13109976224",
"sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"tags": [
"personal",
"customers",
"active-customers"
],
"data_limit": {
"amount": "2048.0",
"unit": "MB"
},
"current_billing_period_consumed_data": {
"amount": "2049.0",
"unit": "MB"
},
"actions_in_progress": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"esim_installation_status": "released",
"version": "4.3",
"resources_with_in_progress_actions": [],
"eid": null,
"authorized_imeis": [
"106516771852751",
"534051870479563",
"508821468377961"
]
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Get all SIM cards belonging to the user that match the given filters.
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 simpleSimCard of client.simCards.list()) {
console.log(simpleSimCard.id);
}{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card",
"status": {
"value": "enabled",
"reason": "The SIM card is active, ready to connect to networks and consume data."
},
"type": "physical",
"iccid": "89310410106543789301",
"imsi": "081932214823362973",
"msisdn": "+13109976224",
"sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"tags": [
"personal",
"customers",
"active-customers"
],
"data_limit": {
"amount": "2048.0",
"unit": "MB"
},
"current_billing_period_consumed_data": {
"amount": "2049.0",
"unit": "MB"
},
"actions_in_progress": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"esim_installation_status": "released",
"version": "4.3",
"resources_with_in_progress_actions": [],
"eid": null,
"authorized_imeis": [
"106516771852751",
"534051870479563",
"508821468377961"
]
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter for SIM cards (deepObject style). Originally: filter[tags], filter[iccid], filter[status]
Show child attributes
A list of SIM card tags to filter on.
If the SIM card contains all of the given tags they will be found.
For example, if the SIM cards have the following tags:
['customers', 'staff', 'test']
['test']['customers']['customers', 'test'] returns only the first because it's the only one with both tags.test returns the first two SIMs, because both of them have such tag.customers returns the first and last SIMs.["personal", "customers", "active-customers"]A search string to partially match for the SIM card's ICCID.
"89310410106543789301"
Filter by a SIM card's status.
enabled, disabled, standby, data_limit_exceeded, unauthorized_imei It includes the associated SIM card group object in the response when present.
true
A valid SIM card group ID.
"47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9"
Sorts SIM cards by the given field. Defaults to ascending order unless field is prefixed with a minus sign.
current_billing_period_consumed_data.amount, -current_billing_period_consumed_data.amount Successful response
Show child attributes
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
"sim_card"
Show child attributes
The current status of the SIM card. It will be one of the following:
registering - the card is being registeredenabling - the card is being enabledenabled - the card is enabled and ready for usedisabling - the card is being disableddisabled - the card has been disabled and cannot be useddata_limit_exceeded - the card has exceeded its data consumption limitsetting_standby - the process to set the card in stand by is in progressstandby - the card is in stand byregistering, enabling, enabled, disabling, disabled, data_limit_exceeded, setting_standby, standby "enabled"
It describes why the SIM card is in the current status.
"The SIM card is active, ready to connect to networks and consume data."
The type of SIM card
physical, esim "physical"
The ICCID is the identifier of the specific SIM card/chip. Each SIM is internationally identified by its integrated circuit card identifier (ICCID). ICCIDs are stored in the SIM card's memory and are also engraved or printed on the SIM card body during a process called personalization.
"89310410106543789301"
SIM cards are identified on their individual network operators by a unique International Mobile Subscriber Identity (IMSI).
Mobile network operators connect mobile phone calls and communicate with their market SIM cards using their IMSIs. The IMSI is stored in the Subscriber Identity Module (SIM) inside the device and is sent by the device to the appropriate network. It is used to acquire the details of the device in the Home Location Register (HLR) or the Visitor Location Register (VLR).
"081932214823362973"
Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally.
MSISDN is defined by the E.164 numbering plan. It includes a country code and a National Destination Code which identifies the subscriber's operator.
"+13109976224"
The group SIMCardGroup identification. This attribute can be null when it's present in an associated resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Searchable tags associated with the SIM card
["personal", "customers", "active-customers"]Indicate whether the SIM card has any pending (in-progress) actions.
true
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"
The installation status of the eSIM. Only applicable for eSIM cards.
released, disabled "released"
The version of the SIM card.
"4.3"
List of resources with actions in progress.
[]The Embedded Identity Document (eID) for eSIM cards.
null
List of IMEIs authorized to use a given SIM card.
[
"106516771852751",
"534051870479563",
"508821468377961"
]Was this page helpful?