Overview
Set up Azure Blob Storage for uploaded videos. Authenticate with either an account key or a SAS token. Credentials are verified before saving.
Your API key for authentication
Request Body
Azure Storage Account name
Storage Account access key (Base64 encoded). Required if sas_token is not provided.
SAS token for authentication. Required if account_key is not provided.
Optional folder prefix for organizing uploads (e.g., downloads/2024/)
Base folder name for uploaded files. Defaults to videos if not specified. Set to a custom value to change the top-level folder where files are stored (e.g., downloads, media).
Provide either account_key OR sas_token, not both. At least one must be provided.
Response
Success confirmation message
Storage provider type: blob
The configured container name
The configured folder prefix (if provided)
Examples
Account Key
SAS Token
Python
Response
curl -X POST "https://api.tornadoapi.io/user/blob" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"account_name": "mystorageaccount",
"container": "tornado-downloads",
"account_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxx=="
}'
Success Response
{
"message" : "Azure Blob storage configured successfully" ,
"provider" : "blob" ,
"container_or_bucket" : "tornado-downloads"
}
Error Responses
400 Bad Request - Missing Auth
400 Bad Request - Invalid Credentials
400 Bad Request - Invalid Key Format
401 Unauthorized
{
"error" : "Either account_key or sas_token must be provided"
}
Verification Process
When you submit storage configuration, Tornado:
Validates that either account_key or sas_token is provided
Creates a storage client with your credentials
Attempts to upload a small test file (verify_credentials.txt)
Deletes the test file
If successful, saves the configuration encrypted
Required SAS Permissions
When using a SAS token, ensure these permissions are enabled:
Read (r) - For generating download URLs
Write (w) - For uploading files
Delete (d) - For cleanup operations
List (l) - For validation