Watching.vn - Thanks for watching API reference

Please note: This API has been adapted to match the specification from other services. However there are small differences, be aware of them!

Please note: Make sure to use the API with https only, http requests will result in a HTTP 302 redirect to https.

Status Codes:

200: Everything is OK. Request succeeded

400: Bad request (e.g. wrong parameters)

403: Permission denied (wrong api key or action on a file which doesnt belong to you)

404: File not found

409: Confpct

451: Unavailable For Legal Reasons

Account

My Account functions

Account Info
GET
https://watching.vn/api/account/info?key=1nai5nbo4tbp9313s

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String

Response

			{
    "msg": "OK",
    "server_time": "2021-09-11 04:30:07",
    "status": 200,
    "result": {
    	"files_total":"31",
    	"storage_left":1288483337,
    	"login":"megauploader21",
        "email": "[email protected]",
        "premium_expire":"2022-10-15 04:46:59",
        "balance":"108.00000",
        "premium":1,
        "storage_used":"685101"
    }
} 
Account Stats
GET
https://watching.vn/api/account/stats?key=1nai5nbo4tbp9313s

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
last how stats for last X days (default: 7) 14
INT

Response

			{
    "msg": "OK",
    "server_time": "2021-09-11 04:30:07",
    "status": 200,
    "result": {
    	"files_total":"31",
    	"storage_left":1288483337,
    	"login":"megauploader21",
        "email": "[email protected]",
        "premium_expire":"2022-10-15 04:46:59",
        "balance":"108.00000",
        "premium":1,
        "storage_used":"685101"
    }
} 
Upload
Get Upload Server
GET
https://watching.vn/api/upload/server?key=1nai5nbo4tbp9313s

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String

Response

										{
  "msg": "OK",
  "server_time": "2021-08-11 04:29:54",
  "status": 200,
  "result": "https://s1.myvideo.com/upload/01"
} 
Upload File to Server

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
file Video file(s) 1.avi
File
file_title Title of video New release video
String
file_descr Description of video This is sample from
String
snapshot Custom video snapshot (up to 300KB) 1.jpg
File
fld_id Folder ID 25
INT
cat_id Category ID 5
INT
tags Tags list promo, high quality
String
file_public Public flag 1
INT
file_adult Adult flag 1
INT
html_redirect Use old style HTML redirect output instead of JSON 1
INT

Minimal HTML form upload sample

<form method="POST" enctype="multipart/form-data" action="https://s1.myvideo.com/upload/01">
<input type="hidden" name="key" value="1nai5nbo4tbp9313s">
<input type="hidden" name="html_redirect" value="1">
<input type="file" name="file">
<input type="submit">
</form> 

CURL file upload sample:

Upload 2 videos:

curl -X POST -F 'key=1nai5nbo4tbp9313s' -F '[email protected]' -F '[email protected]' https://s1.myvideo.com/upload/01 

Upload video with custom title and snapshot:

curl -X POST -F 'key=1l5ftrilhllgwx2bo' -F 'file_title="Hola!"' -F '[email protected]' -F '[email protected]' http://s1.xvs.tt/upload/01 

Response

{
    "msg": "OK",
    "status": 200,
    "files": [{
        "filecode": "u9150wqzvhxj",
        "filename": "1.avi",
        "status": "OK"
    }, {
        "filecode": "gzky98gfg6hn",
        "filename": "2.avi",
        "status": "OK"
    }]
} 
Upload by URL
GET
https://watching.vn/api/upload/url?key=1nai5nbo4tbp9313s&url={url}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
url URL to video file http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
File
fld_id Folder ID 25
INT
cat_id Category ID 5
INT
file_public Public flag 1
INT
file_adult Adult flag 1
INT
tags Tags list promo, high quality
String

Response

returns future filecode that will work after upload complete

{
	"msg":"OK",
	"server_time":"2021-08-12 20:56:47",
	"status":200,
	"result":{
		"filecode":"fb5asfuj2snh"
	}
} 
File
File Info
GET
https://watching.vn/api/file/info?key=1nai5nbo4tbp9313s&file_code={file_code}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
file_code file code, or list separated by comma gi4o0tlro01u,gi4o0tlro012
String

Response

																								{
														  "msg": "OK",{
	"msg":"OK",
	"server_time":"2021-08-12 21:10:07",
	"status":200,
	"result":[
		{
		"file_views_full":"0",
		"cat_id":"3",
		"player_img":"http://img.xvs.tt/fb5asfuj2snh.jpg",
		"status":200,
		"file_code":"fb5asfuj2snh",
		"file_last_download":"2021-08-12 20:56:54",
		"canplay":1,
		"file_public":"1",
		"file_length":"60",
		"file_title":"big buck bunny",
		"file_views":"0",
		"file_created":"2021-08-102 20:51:52",
		"file_premium_only":"0",
		"file_adult":"1",
		"file_fld_id":"25",
		"tags":"promo, high quality"
		}
	]
} 
File Edit
GET
https://watching.vn/api/file/edit?key=1nai5nbo4tbp9313s&file_code={file_code}&file_title={file_title}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
file_code file code, or list separated by comma gi4o0tlro01u,gi4o0tlro012
String
file_title File title The 100 S01E02
String
file_descr File description release by MegaDrive
String
cat_id Category ID 5
INT
file_fld_id Folder ID 25
INT
file_public Public flag 1
INT
file_adult Adult flag 1
INT
tags Tags list promo, high quality
String

Response

																								{
	"msg":"OK",
	"server_time":"2021-08-13 20:17:12",
	"status":200,
	"result":"true"
} 
File List
GET
https://watching.vn/api/file/list?key=1nai5nbo4tbp9313s

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
fld_id Folder ID 25
INT
title Filter videos by title Iron man
String
created Show only videos uploaded after timestamp.
Specify number to show videos uploaded X minutes ago
2021-07-21 05:07:10
String
file_public Show public (1) or private (0) videos only, empty to show all 1
INT
file_adult Show adult (1) or safe (0) videos only, empty to show all 1
INT
per_page Number of results per page 50
INT
page Page number 2
INT

Response

																								{
	"msg":"OK",
	"server_time":"2021-08-13 20:35:18",
	"status":200,
	"result":
	{
		"files":[
			{
				"thumbnail":"http://img.xvs.tt/fb5asfuj2snh_t.jpg",
				"link":"http://xvs.tt/fb5asfuj2snh.html",
				"file_code":"fb5asfuj2snh",
				"canplay":1,
				"length":"60",
				"views":"0",
				"uploaded":"2021-07-12 20:56:54",
				"public":"0",
				"fld_id":"0",
				"title":"Test 123"
			}
		],
		"results_total":9,
		"pages":9,
		"results":1
	}
} 
File Direct Link
GET
https://watching.vn/api/file/direct_link?key=1nai5nbo4tbp9313s&file_code={file_code}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
file_code File code fb5asfuj2snh
String
q Video quality if available. Possible values: n , h , l, o n
String
hls Generate HLS manifest URL (HLS mod required) 1
INT

Response

																								{
	"msg":"OK",
	"server_time":"2021-08-14 05:32:27",
	"status":200,
	"result":
	{
		"versions":[
			{"url":"http://s1.xvs.tt/zqsccwdttqsal2eyd2pjrlvodgh7iyejldkogrnzwypvlnajbosxsuchfurq/v.mp4","name":"n","size":"120755726"},
			{"url":"http://s1.xvs.tt/zqsccwdttqsal2eyd2pjrlvodgh7iyejldkogrnzwapvlnajbostzwskpx4a/v.mp4","name":"h","size":"135481436"},
			{"url":"http://s1.xvs.tt/zqsccwdttqsal2eyd2pjrlvodgh7iyejldkogrnzwqpvlnajbosrpvmuh5la/v.mp4","name":"l","size":"34744877"},
			{"url":"http://s1.xvs.tt/zqsccwdttqsal2eyd2pjrlvodgh7iyejldkogrnzw4pvlnajbosyx264xtsq/v.mp4","name":"o","size":"319256576"}
		],
		"file_length":"1560",
		"player_img":"http://img.xvs.tt/04nolnuszhph.jpg",
		"hls_direct":"http://s1.xvs.tt/hls/zqsccwdttqsal2eyd2pjrlvodgh7iyejldkogrnzw,qpvlnajbosrpvmuh5la,ypvlnajbosxsuchfurq,apvlnajbostzwskpx4a,.urlset/master.m3u8"
	}
} 
File Clone
GET
https://watching.vn/api/file/clone?key=1nai5nbo4tbp9313s&file_code={file_code}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
file_code File code fb5asfuj2snh
String
file_title New file title if required New video title
String

Response

																								{
	"msg":"OK",
	"server_time":"2021-08-14 19:39:58",
	"status":200,
	"result":
	{
		"url":"http://xvs.tt/u405p6qz5xpi",
		"filecode":"u405p6qz5xpi"
	}
} 
Deleted Files

Get last deleted files list

GET
https://watching.vn/api/file/deleted?key=1nai5nbo4tbp9313s&last={last}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
last Show files deleted in last X hours 24
INT

Response

																								{
	"msg":"OK",
	"server_time":"2021-08-15 19:04:06",
	"status":200,
	"result":[
		{
			"file_code":"38j4wvxw164d",
			"deleted_by":"me",
			"deleted_ago_sec":"40",
			"deleted":"2021-08-15 19:03:26",
			"title":"Video 109779195"
		}
	]
} 
DMCA Files

Get files scheduled for DMCA delete

GET
https://watching.vn/api/file/dmca?key=1nai5nbo4tbp9313s&last={last}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
last Show files deleted in last X hours 24
INT

Response

																								{
	"msg":"OK",
	"server_time":"2021-08-15 19:31:48",
	"status":200,
	"result":[
		{
			"file_code":"x2q5h0uhfzdu",
			"del_in_sec":"42097",
			"del_time":"2021-08-16 07:13:25"
		}
	]
} 
File Encodings

Get current encoding queues

GET
https://watching.vn/api/file/encodings?key=1nai5nbo4tbp9313s

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
code Filter by File code fb5asfuj2snh
String

Response

																								{
	"msg":"OK",
	"server_time":"2021-08-18 21:44:09",
	"status":200,
	"result":[
		{"link":"http://xvs.tt/fb5asfuj2snh.html","progress":15,"status":"ENCODING","name":"Test video","quality":"h","code":"fb5asfuj2snh"},
		{"link":"http://xvs.tt/fb5asfuj2snh.html","progress":0,"status":"PENDING","name":"Test video","quality":"l","code":"fb5asfuj2snh"}
	]
} 
Folder
Folder List
GET
https://watching.vn/api/folder/list?key=1nai5nbo4tbp9313s&fld_id={fld_id}&files=1

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
fld_id Parent folder id, default=0 25
INT
files Show file list in this folder 1
INT

Response

																												{
	"msg":"OK",
	"server_time":"2021-08-15 19:54:22",
	"status":200,
	"result":{
		"folders":[
			{
				"name":"Breaking Bad",
				"fld_id":"16",
				"code":"4pwb4yvp7v"
			},
			{
				"name":"Travis",
				"fld_id":"15",
				"code":"68dth39m76"
			}
		],
		"files":[
			{
				"thumbnail":"http://img.xvs.tt/04nolnuszhph_t.jpg",
				"link":"http://xvs.tt/04nolnuszhph.html",
				"file_code":"04nolnuszhph",
				"canplay":1,
				"length":"1560",
				"views":"10",
				"uploaded":"2021-08-20 20:37:22",
				"public":"0",
				"fld_id":"0",
				"title":"Tri pljus dva 2012 SATRip"
			}
		]
	}
} 
Folder Create
GET
https://watching.vn/api/folder/create?key=1nai5nbo4tbp9313s&name={name}&parent_id={parent_id}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
name Folder name New Videos
String
parent_id Parent Folder ID 0
INT
descr Folder description new stuff
String

Response

																												{
	"msg":"OK",
	"server_time":"2021-08-18 20:32:46",
	"status":200,
	"result":
	{
		"fld_id":"29"
	}
} 
Folder Edit

Update folder details, skipped fields won't be updated

GET
https://watching.vn/api/folder/edit?key=1nai5nbo4tbp9313s&fld_id={fld_id}&name={name}

Parameters

Name Description Example: Required Type
key API key 1nai5nbo4tbp9313s
String
fld_id Folder ID 25
INT
name Folder name Movies 2021
String
parent_id Parent Folder ID 0
INT
descr Folder description old stuff
String
descr Folder description new stuff
String

Response

																												{
	"msg":"OK",
	"server_time":"2021-08-18 21:21:44",
	"status":200,
	"result":"true"
} 
TAGS