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 mobilePhoneNumber of client.mobilePhoneNumbers.list()) {
console.log(mobilePhoneNumber.id);
}{
"data": [
{
"id": "<string>",
"record_type": "mobile_phone_number",
"phone_number": "<string>",
"sim_card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"connection_id": "<string>",
"connection_name": "<string>",
"connection_type": "<string>",
"mobile_voice_enabled": true,
"tags": [
"<string>"
],
"customer_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"call_forwarding": {
"call_forwarding_enabled": true,
"forwards_to": "<string>",
"forwarding_type": "always"
},
"country_iso_alpha2": "<string>",
"noise_suppression": "inbound",
"inbound_call_screening": "disabled",
"caller_id_name_enabled": true,
"call_recording": {
"inbound_call_recording_enabled": true,
"inbound_call_recording_channels": "single",
"inbound_call_recording_format": "wav"
},
"cnam_listing": {
"cnam_listing_enabled": true,
"cnam_listing_details": "<string>"
},
"outbound": {
"interception_app_id": "<string>",
"interception_app_name": "<string>"
},
"inbound": {
"interception_app_id": "<string>",
"interception_app_name": "<string>"
}
}
],
"meta": {
"total_pages": 123,
"page_number": 123,
"total_results": 123,
"page_size": 123
}
}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 mobilePhoneNumber of client.mobilePhoneNumbers.list()) {
console.log(mobilePhoneNumber.id);
}{
"data": [
{
"id": "<string>",
"record_type": "mobile_phone_number",
"phone_number": "<string>",
"sim_card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"connection_id": "<string>",
"connection_name": "<string>",
"connection_type": "<string>",
"mobile_voice_enabled": true,
"tags": [
"<string>"
],
"customer_reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"call_forwarding": {
"call_forwarding_enabled": true,
"forwards_to": "<string>",
"forwarding_type": "always"
},
"country_iso_alpha2": "<string>",
"noise_suppression": "inbound",
"inbound_call_screening": "disabled",
"caller_id_name_enabled": true,
"call_recording": {
"inbound_call_recording_enabled": true,
"inbound_call_recording_channels": "single",
"inbound_call_recording_format": "wav"
},
"cnam_listing": {
"cnam_listing_enabled": true,
"cnam_listing_details": "<string>"
},
"outbound": {
"interception_app_id": "<string>",
"interception_app_name": "<string>"
},
"inbound": {
"interception_app_id": "<string>",
"interception_app_name": "<string>"
}
}
],
"meta": {
"total_pages": 123,
"page_number": 123,
"total_results": 123,
"page_size": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful response
Show child attributes
Identifies the resource.
Identifies the type of the resource.
"mobile_phone_number"
The +E.164-formatted phone number.
The ID of the SIM card associated with this number.
The status of the phone number.
The ID of the connection associated with this number.
The name of the connection.
The type of the connection.
Indicates if mobile voice is enabled.
A list of tags associated with the number.
A customer reference string.
ISO 8601 formatted date indicating when the resource was created.
ISO 8601 formatted date indicating when the resource was last updated.
The ISO 3166-1 alpha-2 country code of the number.
The noise suppression setting.
inbound, outbound, both, disabled The inbound call screening setting.
disabled, reject_calls, flag_calls Indicates if caller ID name is enabled.
Was this page helpful?