Skip to main content
GET
/
files
/
provider
/
{provider}
/
download
/
{key}
curl -L -X GET "https://api.tktchurch.com/v1/files/provider/s3/download/uploads/abc123.jpg" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
HTTP/1.1 302 Found
Location: https://storage.example.com/uploads/abc123.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...
This endpoint requires authentication and the viewFiles permission. The endpoint returns a 302 redirect to a signed URL that expires in 5 minutes.

Path Parameters

provider
string
required
The storage provider. One of:
  • s3: Amazon S3 storage
  • local: Local file storage
key
string
required
The storage key/path of the file

Response

Returns HTTP 302 Found with a Location header containing a signed URL for downloading the file.

Error Responses

error
object
Error details when the request fails
Common error cases:
  • 400 Bad Request: Invalid provider or key
  • 401 Unauthorized: Missing or invalid access token
  • 403 Forbidden: Missing required permission
  • 404 Not Found: File not found
curl -L -X GET "https://api.tktchurch.com/v1/files/provider/s3/download/uploads/abc123.jpg" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
HTTP/1.1 302 Found
Location: https://storage.example.com/uploads/abc123.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...