Authentication
Authenticate your requests by including your API key in the x-api-key header. You can generate and manage your API keys in the Dashboard.
Keep your API key secure
Never expose your API key in client-side code or public repositories. Use environment variables and server-side requests.
Example Headers
x-api-key: gd_1234567890abcdef... Content-Type: application/json
Process File
The primary endpoint for processing files and generating secure links.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Google Drive file URL (public or accessible) |
| expiresIn | number | No | Expiry time in seconds (default: 3600 = 1 hour) |
Code Examples
curl -X POST https://api.driveshadow.com/api/v1/process \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://drive.google.com/file/d/FILE_ID/view",
"expiresIn": 3600
}'Response
The response depends on your plan. Hosted plans return a branded download page URL, while Direct API plans return the actual file URL.
Success Response (200 OK)
{
"success": true,
"result_url": "https://driveshadow.com/download/abc123...",
"id": "abc123..."
}Error Responses
401 Unauthorized
{
"error": "Invalid API Key"
}402 Payment Required
{
"error": "Limit Exceeded",
"message": "You have reached the API call limit for your current plan.",
"upgrade_url": "/dashboard/billing"
}500 Internal Server Error
{
"error": "Failed to process request",
"details": "Error message details"
}Rate Limits
Rate limits vary by plan to ensure fair usage and system stability.
| Plan | API Calls | Rate Limit |
|---|---|---|
| Free | 100/day | 10/minute |
| Hosted | 10,000/month | 60/minute |
| Direct API | Unlimited | 120/minute |
Rate Limit Headers: Each response includes X-RateLimit-Limit and X-RateLimit-Remaining headers.
Best Practices
Use HTTPS
Always use HTTPS for API requests to ensure data security and encryption.
Handle Errors
Implement proper error handling for all API responses, especially rate limits.
Set Expiry Times
Configure appropriate expiry times based on your use case to maintain security.
Monitor Usage
Track your API usage in the dashboard to avoid hitting rate limits.
Need Help?
Have questions about the API? Check our FAQ or contact our support team.