Transform Google Drive links into shareable streaming URLs
The DOTFLIX API allows you to convert Google Drive video links into shareable streaming URLs. Simply provide your authorization key and a Google Drive URL, and receive a shareable link in return.
All API requests require dual authentication with both an authorization key and an API key. Include both keys in the request body:
{
"authorization": "your-auth-key-here",
"apiKey": "your-api-key-here"
}
โ ๏ธ Important: Keep both your authorization key and API key secure and never expose them in client-side code. Both keys are required for all API requests.
/api/create-share
Convert a Google Drive URL into a shareable streaming link
/api/share-status/:code
Get the current status and details of a sharing link
/api/sharing-status
Check if the sharing service is currently available
/api/share-status/:code
Parameter | Type | Description |
---|---|---|
code | string | The sharing code returned from create-share |
{
"success": true,
"sharingCode": "ABC12345",
"filename": "movie.mp4",
"fileType": "mp4",
"status": "completed",
"downloadCount": 5,
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:05:00.000Z",
"shareLink": "https://your-domain.com/share/ABC12345"
}
pending
Request received, processing not started
processing
Currently being processed
completed
Ready for download
failed
Processing failed
// Create share link
async function createShareLink(authKey, apiKey, driveUrl) {
const response = await fetch('https://your-domain.com/api/create-share', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
authorization: authKey,
apiKey: apiKey,
driveUrl: driveUrl
})
});
const data = await response.json();
if (data.success) {
console.log('Share link created:', data.shareLink);
return data;
} else {
console.error('Error:', data.error);
throw new Error(data.error);
}
}
// Check status
async function checkStatus(sharingCode) {
const response = await fetch(`https://your-domain.com/api/share-status/${sharingCode}`);
const data = await response.json();
if (data.success) {
console.log('Status:', data.status);
return data;
} else {
console.error('Error:', data.error);
throw new Error(data.error);
}
}
// Usage
const authKey = 'your-auth-key';
const apiKey = 'your-api-key';
const driveUrl = 'https://drive.google.com/file/d/1BxiMVs0XRA5nFMRX-nheFMQRHjb_FLyzB/view';
createShareLink(authKey, apiKey, driveUrl)
.then(result => {
console.log('Created:', result.shareLink);
return checkStatus(result.sharingCode);
})
.then(status => {
console.log('Current status:', status.status);
})
.catch(error => {
console.error('Error:', error.message);
});
import requests
import json
class DotflixAPI:
def __init__(self, base_url, auth_key, api_key):
self.base_url = base_url
self.auth_key = auth_key
self.api_key = api_key
def create_share_link(self, drive_url):
"""Create a new share link"""
url = f"{self.base_url}/api/create-share"
payload = {
"authorization": self.auth_key,
"apiKey": self.api_key,
"driveUrl": drive_url
}
response = requests.post(url, json=payload)
data = response.json()
if data.get('success'):
return data
else:
raise Exception(f"API Error: {data.get('error')}")
def check_status(self, sharing_code):
"""Check the status of a share link"""
url = f"{self.base_url}/api/share-status/{sharing_code}"
response = requests.get(url)
data = response.json()
if data.get('success'):
return data
else:
raise Exception(f"API Error: {data.get('error')}")
# Usage
api = DotflixAPI('https://your-domain.com', 'your-auth-key', 'your-api-key')
try:
# Create share link
drive_url = 'https://drive.google.com/file/d/1BxiMVs0XRA5nFMRX-nheFMQRHjb_FLyzB/view'
result = api.create_share_link(drive_url)
print(f"Share link created: {result['shareLink']}")
print(f"Sharing code: {result['sharingCode']}")
# Check status
status = api.check_status(result['sharingCode'])
print(f"Current status: {status['status']}")
except Exception as e:
print(f"Error: {e}")
# Create share link
curl -X POST https://your-domain.com/api/create-share \
-H "Content-Type: application/json" \
-d '{
"authorization": "your-auth-key",
"apiKey": "your-api-key",
"driveUrl": "https://drive.google.com/file/d/1BxiMVs0XRA5nFMRX-nheFMQRHjb_FLyzB/view"
}'
# Check status (replace ABC12345 with actual sharing code)
curl https://your-domain.com/api/share-status/ABC12345
Status Code | Error | Description | Solution |
---|---|---|---|
400 | Authorization key is required | Missing authorization in request | Include authorization key in request body |
400 | API key is required | Missing apiKey in request | Include API key in request body |
400 | Drive URL is required | Missing driveUrl in request | Include valid Google Drive URL |
401 | Invalid authorization key | Authorization key not recognized | Check your authorization key |
401 | Invalid API key | API key not recognized | Check your API key |
400 | Invalid Google Drive URL format | URL doesn't match Drive patterns | Use valid Google Drive file URL |
400 | Only MP4 and MKV files are supported | File type not supported | Use MP4 or MKV video files only |
404 | Share link not found | Sharing code doesn't exist | Check the sharing code |
500 | Internal server error | Server-side error occurred | Try again later or contact support |
503 | Service temporarily unavailable | Sharing disabled for maintenance | Wait for maintenance to complete |
POST
https://your-domain.com/api/create-share
Content-Type: application/json
Download our Postman collection for comprehensive API testing:
Need help? Contact our support team or check the main website