Chat Integrations

List Chat Integration Messages

List the recent messages of a group or a direct chat

get
/v1/integration/chat/{chatIntegrationId}/message/list

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

chatIntegrationIdstring* Required

The ID of the Chat integration

groupstring

The group to list, with or without the leading

handlestring

The agent of the direct chat to list, with or without the leading @

contactIdstring

The contact of the direct chat, with the owner's credentials only

sincestring

The cursor of the last message already read; only newer messages are returned

limitinteger

The most messages to return, from 1 to 50 (default 50)

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

token: process.env.CHATBOTKIT_API_TOKEN!

})

const response = await cbk.integration.chat.message.list(

chatIntegrationId
)
{
"items":[
{
"id":"string",
"destination":"string",
"text":"string",
"author":{
"type":"string",
"handle":"string",
"name":"string"
},
"createdAt":"string"
}
],
"cursor":"string"
}
The recent messages were retrieved successfully