Files

Download file from bucket

Download a file from a bucket. For public files, no authentication is required. For private files, a download token (obtained via signed URL endpoint) is required in the query parameter. Accepts: Token-based authentication via query parameter (for private files), or no authentication (for public files).

AuthPublic
GroupFiles
Rate limitSee Rate Limits
GET/api/bucket/files/{fileId}/download

SDK setup

Create a client instance. No authentication is required for this endpoint.

import { Configuration, FilesApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const files = new FilesApi(configuration);
import { Configuration, FilesApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const files = new FilesApi(configuration);

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const { data: result } = await files.downloadBucketFile("file_LnkV6fyeCQ60kiAP");
const { data: result } = await files.downloadBucketFile("file_LnkV6fyeCQ60kiAP");

Playground

live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

No Request Yet

Send a request to see the full inspector

Authentication

Public — No Auth Required

Path Parameters

NameTypeRequiredDescription
fileIdstringYes

Query Parameters

NameTypeRequiredDescription
tokenstringNo

Responses

200File download
403Access denied or invalid token
json
{
  "error": "Invalid or expired download token"
}
{
  "error": "Invalid or expired download token"
}
404File not found
json
{
  "error": "File not found"
}
{
  "error": "File not found"
}

Errors

CodeMeaning
403Access denied or invalid token
404File not found
Edit this page on GitHub