import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const register = await client.actions.register.create({
registration_codes: ['0000000001', '0000000002', '0000000003'],
});
console.log(register.data);{
"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"
]
}
],
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Register the SIM cards associated with the provided registration codes to the current user’s account.
If sim_card_group_id is provided, the SIM cards will be associated with that group. Otherwise, the default group for the current user will be used.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const register = await client.actions.register.create({
registration_codes: ['0000000001', '0000000002', '0000000003'],
});
console.log(register.data);{
"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"
]
}
],
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
["0000000001", "0000000002", "0000000003"]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"]Status on which the SIM card will be set after being successful registered.
enabled, disabled, standby "standby"
Successful response
Successfully registered SIM cards.
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"
]Show child attributes
Was this page helpful?