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 commentListResponse of client.portingOrders.comments.list(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
)) {
console.log(commentListResponse.id);
}{
"data": [
{
"id": "f1486bae-f067-460c-ad43-73a92848f902",
"body": "Great experience so far",
"porting_order_id": "f1486bae-f067-460c-ad43-73a92848f902",
"user_type": "user",
"record_type": "porting_comment",
"created_at": "2021-03-19T10:07:15.527Z"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Returns a list of all comments of a porting order.
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 commentListResponse of client.portingOrders.comments.list(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
)) {
console.log(commentListResponse.id);
}{
"data": [
{
"id": "f1486bae-f067-460c-ad43-73a92848f902",
"body": "Great experience so far",
"porting_order_id": "f1486bae-f067-460c-ad43-73a92848f902",
"user_type": "user",
"record_type": "porting_comment",
"created_at": "2021-03-19T10:07:15.527Z"
}
],
"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.
Porting Order id
Consolidated page parameter (deepObject style). Originally: page[size], page[number]
Show child attributes
Was this page helpful?