Space Storages

Download Space Storage Path

Download a file from space storage

get
/v1/space/{spaceId}/storage/download/{path}

Description

Download a file from space storage. The file path is specified in the URL after /download/. Can return either the direct file content (default) or a presigned download URL (when Accept: application/json).

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

spaceIdstring* Required

The ID of the space

pathstring* Required

The file path

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.space.storage.download(

spaceId, path
)
{
"id":"string",
"url":"string"
}
The file was downloaded successfully