Skip to content

Downloads API

Endpoints for generating download URLs and share links.

Get Download URL

Generate a pre-signed URL to download a file.

GET /v1/downloads/url

Query Parameters

Parameter Type Required Description
applicationId string Yes The application ID
version string Yes The version string
fileId string No Specific file ID (for multi-file versions)

URL Expiration

Download URLs expire after 30 minutes. Generate a new URL if the download doesn't complete in time.

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.bindist.eu/v1/downloads/url?applicationId=my-app&version=2.1.0"
const result = await client.getDownloadInfo('my-app', '2.1.0');
if (result.success) {
  console.log(result.data.downloadUrl);
}

Example Response

{
  "success": true,
  "data": {
    "downloadUrl": "https://s3.eu-central-1.amazonaws.com/bindist-apps/...",
    "expiresAt": "2025-01-15T12:30:00Z",
    "fileName": "my-app-2.1.0.exe",
    "fileSize": 15728640,
    "checksum": "sha256:e3b0c44298fc1c149afbf4c8996fb924..."
  }
}

Downloading the File

Use the pre-signed URL to download directly:

curl -L -o my-app-2.1.0.exe "DOWNLOAD_URL"
import { writeFileSync } from 'fs';

const buffer = await client.downloadFile(downloadUrl);
writeFileSync('my-app-2.1.0.exe', Buffer.from(buffer));
Invoke-WebRequest -Uri $downloadUrl -OutFile "my-app-2.1.0.exe"

Error Responses

Version Not Found (404)

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Version not found"
  }
}

Tier Access Denied (403)

{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "This version requires Premium tier access"
  }
}

Create a shareable download link that can be used without authentication.

POST /v1/downloads/share

Request Body

Field Type Required Description
applicationId string Yes The application ID
version string Yes The version string
fileId string No Specific file ID
expiresInMinutes number No Expiration time (default: 30, max: 1440)

Example Request

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "applicationId": "my-app",
    "version": "2.1.0",
    "expiresInMinutes": 60
  }' \
  https://api.bindist.eu/v1/downloads/share
const result = await client.createShareLink({
  applicationId: 'my-app',
  version: '2.1.0',
  expiresInMinutes: 60
});
console.log(result.data.shareUrl);

Example Response

{
  "success": true,
  "data": {
    "shareUrl": "https://api.bindist.eu/v1/downloads/share/tok_abc123xyz",
    "expiresAt": "2025-01-15T13:00:00Z",
    "token": "tok_abc123xyz"
  }
}

Use Cases for Share Links

  • Send download links to users without API keys
  • Embed in emails or documentation
  • Time-limited access for testing or demos