GET /api/files
This API endpoint checks if a file is available and returns its information based on the provided URL.
curl -X GET "https://akirabox.com/api/files?url=https://akirabox.com/{id}/file"
import requests
url = "https://akirabox.com/api/files"
params = {
"url": "https://akirabox.com/{id}/file"
}
response = requests.get(url, params=params)
print(response.json())
$url = 'https://akirabox.com/api/files?url=' .
urlencode('https://akirabox.com/{id}/file');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
const axios = require('axios');
const checkFile = async () => {
try {
const response = await axios.get('https://akirabox.com/api/files', {
params: {
url: 'https://akirabox.com/{id}/file'
}
});
console.log( response.data);
} catch (error) {
if (error.response) {
console.error('Error:', error.response.data.message);
} else {
console.error('Error:', error.message);
}
}
};
checkFile();
{
"status": 200,
"name": "example.pdf",
"size": "1.2 MB",
"type": "file",
"mime": "application/pdf",
"url": "https://akirabox.com/{id}/file"
}
{
"status": 404,
"message": "File not found"
}
Only available for Premium Users...