Files
Download File
Download a file
get
/v1/file/{fileId}/download
Description
Download a file. If the file is not public, the user must be authenticated.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
fileIdstring* Required
The ID of the file to download
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.file.download(
fileId)
{"url":"string"}
The file was downloaded successfully