Files
Fetch File
Fetch a file
get
/v1/file/{fileId}/fetch
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
fileIdstring* Required
The ID of the file to retrieve
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.file.fetch(
fileId)
{"name":"string","description":"string","meta":"object","id":"string","createdAt":"number","updatedAt":"number","visibility":"string"}
The file was retrieved successfully