import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const comments = await client.comments.list();
console.log(comments.data);{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"body": "Hi there, ....",
"commenter": "[email protected]",
"commenter_type": "user",
"comment_record_type": "sub_number_order",
"comment_record_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"read_at": "2018-01-01T00:00:00.000000Z",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const comments = await client.comments.list();
console.log(comments.data);{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"body": "Hi there, ....",
"commenter": "[email protected]",
"commenter_type": "user",
"comment_record_type": "sub_number_order",
"comment_record_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"read_at": "2018-01-01T00:00:00.000000Z",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z"
}
],
"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 (deepObject style). Originally: filter[comment_record_type], filter[comment_record_id]
An array of Comment Responses
Show child attributes
"12ade33a-21c0-473b-b055-b3c836e1c292"
"Hi there, ...."
admin, user "user"
sub_number_order, requirement_group "sub_number_order"
"8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
An ISO 8901 datetime string for when the comment was read.
"2018-01-01T00:00:00.000000Z"
An ISO 8901 datetime string denoting when the comment was created.
"2018-01-01T00:00:00.000000Z"
An ISO 8901 datetime string for when the comment was updated.
"2018-01-01T00:00:00.000000Z"
Was this page helpful?