- General
- Upload
- Url upload
- - List tasks
- - Create task
- - Destroy task
- Status of Files
- Folder Management
- - List Folder
- - Show the specific Folder
- - Rename Foder
- - Create Folder
- Files Management
- - List files
- - Filtering
- - Sorting
- - Update file
- - Clone upload
- Srt Management
- - List srt
- - Upload srt
- - Upload srt from url
- - Destroy srt
- Abuses
Vidoza API
General
Base-URL for our API is https://api.vidoza.net
Requests to the API should be made via HTTP GET or POST parameters. Response is always in JSON-Format.
Authorization requires API key, which you can find in your settings menu in the User Panel. API key should be added in HTTP headers:
Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK
or as GET / POST parameter api_token
HTTP Upload
Request URL
https://api.vidoza.net/v1/upload/http/serverThere are 2 stage in upload:
1. You should get an Upload URL via GET request.
Example of request
curl -X GET \
https://api.vidoza.net/v1/upload/http/server \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{
"data": {
"upload_url": "https://upload22.vidoza.net/upload/03",
"upload_params": {
"is_xhr": true,
"sess_id": "SDErfNTBc03PYnmw"
}
}
}
2. Uploads should be made via POST request to the upload URL returned by our API and it
should be multipart/form-data encoded.
Also you should add all parameters (upload_params) received in GET request.
Example of request
curl -X POST \
https://upload22.vidoza.net/upload/03 \
-H 'cache-control: no-cache' \
-F is_xhr=true \
-F sess_id=SDErfNTBc03PYnmw \
-F file=@/tmp/video.mp4
Example of response
{
"status": "OK",
"code": "zb736dqrhx45"
}
The file will be available by URL https://vidoza.net/zb736dqrhx45.html
Parameters
Required parameters for upload:
- is_xhr (always “ true”)
- sess_id
- file - file for upload
Optional parameters (see https://vidoza.net/?op=upload_multi)
- file_title
- fld_id - folder id
- cat_id - Video Category. Adult = 2 Not adult = 3
Example
<?PHP
function vidoza_upload($apiToken, $file, $params = array())
{
// Get upload server
$ch = curl_init('https://api.vidoza.net/v1/upload/http/server');
$authorization = "Authorization: Bearer ".$apiToken; // Prepare the authorisation token
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization )); // Inject the token into the header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) != 200) {
return false;
}
curl_close($ch);
$res = json_decode($res);
if (!$res->data) {
return false;
}
// POST variables
$postParams = array();
foreach (array_merge((array) $res->data->upload_params, $params) as $field => $value) {
$postParams[$field] = $value;
}
if (function_exists('curl_file_create')) { // php 5.5+
$postParams['file'] = curl_file_create($file);
} else {
$postParams['file'] = '@' . realpath($file);
}
// Upload file
$ch = curl_init($res->data->upload_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
if (curl_errno($ch)) {
print curl_error($ch);
print "Unable to upload file." . curl_errno($ch);
return false;
}
curl_close($ch);
$res = json_decode($postResult, true);
if (($res['status'] != 'OK')) {
print "Upload error:" . $res['code'];
return false;
}
}
$apiToken = 'GIjUt8';
$fileCode = vidoza_upload($apiToken, '/tmp/video.mp4');
print "https://vidoza.net/{$fileCode}.html";
Url upload
List tasks
Request URL
Example of request
curl -X GET \
'https://api.vidoza.net/v1/upload/url' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
[{"id":2,"url":"https:\/\/vidoza.net\/nzkz5ru1gsg4.html","status":"PENDING","created":"2021-07-01T13:58:41.000000Z","error":"","file_code":""}]
Create new task
Request URL
Parameters
- cat_id - category id (integer, required, 2 - Adult, 3 - Not adult)
- fld_id - folder id (integer, required, 0 for root folder)
- url - source url for download (string, required)
Example of request
curl -X POST \
'https://api.vidoza.net/v1/upload/url' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache' \
-F cat_id=2 \
-F fld_id=0 \
-F "url=https://vidoza.net/nzkz5ru1gsg4.html"
Example of response
{"id":3,"url":"https:\/\/vidoza.net\/nzkz5ru1gsg4.html","status":null,"created":"2021-07-02T07:12:02.000000Z","error":null,"file_code":null}
Destroy exists task
Request URL
Example of request
curl -X DELETE \
'https://api.vidoza.net/v1/upload/url/3' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Status of files
You can check whether your file is active or deleted.
Request URL
Files’ codes should be sent via GET array (not more 500 codes) such a way
?f[]=dsx720i6x2zn&f[]=kk2osjr01ogp&f[]=zb736dqrhx45
Example of request
curl -X GET \
'https://api.vidoza.net/v1/files/check?f[]=dsx720i6x2zn&f[]=kk2osjr01ogp&f[]=zb736dqrhx45' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{
"data": [
{
"id": "dsx720i6x2zn",
"name": "Ariana Grande - God is woman.mp4",
"title": "Ariana Grande - God is woman",
"folder_id": 0,
"status": "active",
"streamable": true
},
{
"id": "kk2osjr01ogp",
"name": "Naan_Kadavul.avi",
"title": "Naan Kadavul",
"folder_id": 0,
"status": "active",
"streamable": false
},
{
"id": "zb736dqrhx45",
"name": "Cinema_countdown_timer.mp4",
"title": "Cinema countdown timer",
"folder_id": 0,
"status": "deleted",
"delete_reason": "abuse"
}
]
}
Fields of response
- Status: “active” / “deleted”
- Delete_reason: if the file was deleted, you get the reason of deletion
- Streamable: “true” if the file was already encoded / “false” if the file is in encoding queue
Folder Management
Request URL
List Folder
Shows the list of your folders
Example of request
curl -X GET \
https://api.vidoza.net/v1/folders \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{
"data": [
{
"id": 12,
"name": "TopFolder2",
"parent_id": 0
},
{
"id": 69,
"name": "TopFolder1",
"parent_id": 0
},
{
"id": 42428,
"name": "torrent",
"parent_id": 0
},
{
"id": 96087,
"name": "SecondLevel1",
"parent_id": 69
},
{
"id": 96088,
"name": "SecondLevel2",
"parent_id": 69
},
{
"id": 96089,
"name": "ThirdLevel1",
"parent_id": 96087
}
],
"links": {
"first": "https://api.vidoza.net/v1/folders?page=1",
"last": "https://api.vidoza.net/v1/folders?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.vidoza.net/v1/folders",
"per_page": 100,
"to": 6,
"total": 6
}
}
Show the specific folder
Example of request
curl -X GET \
https://api.vidoza.net/v1/folders/69 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{
"data": {
"id": 69,
"name": "TopFolder1",
"parent_id": 0,
"subfolders": [
96087,
96088
]
}
}
Fields of response
- “subfolders” is ID of subfolders
Rename Folder
Example of request
curl -X PUT \
'https://api.vidoza.net/v1/folders/96088?name=NewName' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Create Folder
Example of request
curl -X POST \
'https://api.vidoza.net/v1/folders?name=NewFolder&parent_id=69' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Parameters
Example of response
{
"data": {
"id": 96090,
"name": "NewFolder",
"parent_id": "69",
"subfolders": []
}
}
Files Management
Request URL
List Files
Shows the list of your files
Example of request
curl -X GET \
https://api.vidoza.net/v1/files \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{
"data": [
{
"id": "test-code1",
"name": "test name1",
"name_seo": "test name seo",
"title": "test title1",
"folder_id": 100846,
"downloads": 0,
"views_paid": 0,
"category": "Not adult",
"size": 0,
"created": "0000-00-00 00:00:00",
"status": "active",
"streamable": false
},
{
"id": "test-code2",
"name": "test name2",
"name_seo": "test name seo",
"title": "test title2",
"folder_id": 0,
"downloads": 0,
"views_paid": 0,
"size": 0,
"created": "0000-00-00 00:00:00",
"status": "active",
"streamable": false
}
],
"links": {
"first": "https://api.vidoza.net/v1/files?page=1",
"last": "https://api.vidoza.net/v1/files?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.vidoza.net/v1/files",
"per_page": 100,
"to": 2,
"total": 2
}
}
Filtering
When you get list of files you can filter result by using GET parameters
- name
- name_seo
- title
- folder_id
- category - adult category (Adult/Not adult)
- downloads_from
- views_paid_from
- downloads_to
- views_paid_to
Example of request
curl -X GET \
"https://api.vidoza.net/v1/files?name=test name1&name_seo=test name seo" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{
"data": [
{
"id": "test-code1",
"name": "test name1",
"name_seo": "test name seo",
"title": "test title1",
"folder_id": 100846,
"downloads": 0,
"views_paid": 0,
"category": "Not adult",
"size": 0,
"created": "0000-00-00 00:00:00",
"status": "active",
"streamable": false
},
],
"links": {
"first": "https://api.vidoza.net/v1/files?name=test%20name1&name_seo=test%20name%20seo&page=1",
"last": "https://api.vidoza.net/v1/files?name=test%20name1&name_seo=test%20name%20seo&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.vidoza.net/v1/files/100846",
"per_page": 100,
"to": 1,
"total": 1
}
}
Sorting
When you get list of files you can sort result by using GET parameters
Example of request
curl -X GET \
https://api.vidoza.net/v1/files?orderColumn=name&orderDirection=desc \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Update file
Request URL
Parameters
- name - Name of file, string, max 255 symbols
- name_seo - Seo name of file<, string, max 255 symbols
- title - Title of file, string, max 255 symbols
- folder_id - Id of file folder (integer, not null, folder must be exists, you shod be owner of this folder)
Example of request
curl -X POST \
https://api.vidoza.net/v1/files/test-code1 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache' \
-F "name=test name edited" \
-F "name_seo=test name_seo edited" \
-F "title=test title edited" \
-F "folder_id=100846"
Example of response
{
"data": {
"id": "test-code1",
"name": "test name edited",
"name_seo": "test name_seo edited",
"title": "test title edited",
"folder_id": 100846,
"downloads": 0,
"views_paid": 0,
"category": "Not adult",
"size": 0,
"created": "0000-00-00 00:00:00",
"status": "active",
"streamable": false
}
}
Clone upload
Request URL
Parameters
- urls - array with file urls
- category - adult category (Adult/Not adult)
- folder_id - Id of file folder (integer, not null, folder must be exists, you shod be owner of this folder)
Example of request
curl -X POST \
https://api.vidoza.net/v1/upload/clone \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache' \
-F "urls[]=https://vidoza.net/o243zovszbnt/test%20name%20seo" \
-F "urls[]=https://vidoza.net/ylu6o9owewq2/test%20name%20seo" \
-F "category=Adult" \
-F "folder_id=100846"
{
"cloned": [
"kkyj9al0kwry",
"gjuyjrhek28g"
],
"failed": "",
"state": "success"
}
Srt Management
Request URL
List srt
Shows the list srt of you file
Example of request
curl -X GET \
https://api.vidoza.net/v1/files/test-code1/sub \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{"Arabic":{"ext":"vtt","size":2439,"url":"https:\/\/api.vidoza.net\/srt\/01917\/test-code1_Arabic.vtt"}}
Upload srt
Upload srt to you file
Parameters
- srt - file with subtitles (.srt or .vtt)
- srt_lang - language name (supported: Arabic; Bulgarian; Chinese; Croatian; Czech; Danish; English; Filipino; Finnish; French; German; Greek; Hungarian; Icelandic; Indonesian; Italian; Japanese; Norwegian; Polish; Portuguese; Romanian; Russian; Serbian; Spanish; Swedish; Thai; Turkish; Vietnamese)
Example of request
curl -X POST \
https://api.vidoza.net/v1/files/test-code1/sub \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
-F "srt_lang=Arabic"
-F "srt=@/path/to/srt/file.srt"
Example of response
{
"data": {
"id": "test-code1",
"name": "test name1",
"name_seo": "test name seo",
"title": "test title1",
"folder_id": 100846,
"downloads": 0,
"views_paid": 0,
"category": "Not adult",
"size": 0,
"created": "0000-00-00 00:00:00",
"status": "active",
"streamable": false
},
}
Upload srt from url
Upload srt from url to you file
Parameters
- srt_url - file with subtitles (.srt or .vtt)
- srt_lang - language name (supported: Arabic; Bulgarian; Chinese; Croatian; Czech; Danish; English; Filipino; Finnish; French; German; Greek; Hungarian; Icelandic; Indonesian; Italian; Japanese; Norwegian; Polish; Portuguese; Romanian; Russian; Serbian; Spanish; Swedish; Thai; Turkish; Vietnamese)
Example of request
curl -X POST \
https://api.vidoza.net/v1/files/test-code1/sub-url \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
-F "srt_lang=Arabic"
-F "srt_url=http://test.com/file.srt"
Example of response
{
"data": {
"id": "test-code1",
"name": "test name1",
"name_seo": "test name seo",
"title": "test title1",
"folder_id": 100846,
"downloads": 0,
"views_paid": 0,
"category": "Not adult",
"size": 0,
"created": "0000-00-00 00:00:00",
"status": "active",
"streamable": false
},
}
Destroy srt
Destroy selected srt lang from you file
Parameters
- del_srt - lang name (list of lang see in "Upload srt" section)
- ext - removed file extension (srt/vtt)
Example of request
curl -X DELETE \
https://api.vidoza.net/v1/files/test-code1/sub \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
-F "del_srt=Arabic"
-F "ext=vtt"
Example of response
{
"data": {
"id": "test-code1",
"name": "test name1",
"name_seo": "test name seo",
"title": "test title1",
"folder_id": 100846,
"downloads": 0,
"views_paid": 0,
"category": "Not adult",
"size": 0,
"created": "0000-00-00 00:00:00",
"status": "active",
"streamable": false
},
}
Abuses
You can list your abuses files.
Request URL
Example of request
curl -X GET \
'https://api.vidoza.net/v1/files/abuses' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer fB5T3IaHjtUXQNb3IH0Lm4epcRHnkAK' \
-H 'cache-control: no-cache'
Example of response
{
"trash": [
{
"file_code": "qwezxcvbn",
"file_name": "Halalos Fegyver 4 1998 DVDRip-Mozi1974.mp4",
"file_deleted": "2021-09-05T13:40:02.000000Z"
},
...
{
"file_code": "safaerasfasd",
"file_name": "Criminal.Minds.S01.E21.avi",
"file_deleted": "2021-08-10T23:15:04.000000Z"
}
],
"files": [
{
"file_code": "vbfdghdgh",
"file_name": "zhr-jack.the.giant.slayer.mkv",
"delete_time": "2021-09-08T17:16:53.000000Z"
},
...
{
"file_code": "asdasdaer",
"file_name": "cm.s05e19.avi",
"delete_time": "2021-09-09T11:53:59.000000Z"
}
]
}
Fields of response
- Trash - already trashed files
- Files - files which queued to remove