import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const chatThread of client.applications.chatThreads.list('application_variant_id')) {
console.log(chatThread.id);
}
[
{
"id": "<string>",
"title": "<string>",
"application_variant_id": "<string>",
"thread_metadata": {},
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const chatThread of client.applications.chatThreads.list('application_variant_id')) {
console.log(chatThread.id);
}
[
{
"id": "<string>",
"title": "<string>",
"application_variant_id": "<string>",
"thread_metadata": {},
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"created_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
Include archived threads in the response.
Successful Response
The response is of type ChatThreadResponse · object[]
.