General Information

Base-URL for our API is https://api.verystream.com

All requests to the API shall be HTTP GET or POST

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

Most requests require a API Login & API Key, you can find both in the User Panel at the "Account Settings" Tab.

Response is json, structure is as follows:

{
"status": <status-code>,
"msg": "<informational message. might vary, use the status code in your code!>",
"result": <result of the request. varies depending on the request>
}
status

200: Everything is OK. Request succeeded

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

403: Permission denied (wrong api login/key, action on a file which does not belong to you, ...)

404: File not found

451: Unavailable For Legal Reasons

509: Bandwidth usage exceeded. Please try again later. (you might see this during peak hours)

50x: Server errors. You should not see this, but be prepared.

msg

This message gives more detailed information in case there is an error.

You can use this for displaying it to the user, but please don't use it for checking if the request succeeded. That's what the status code is for.

result

holds the response of the request if succeeded. Might hold an array of data or just a boolean true/false, depending on the request

Account Infos

Everything account related (total used storage, reward, ...)

Request
https://api.verystream.com/account/info?login={login}&key={key}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
    "extid": "<userextid>",
    "email": "dogefather@verystream.com",
    "signup_at": "2019-01-09 23:59:59",
}
}
Download Ticket

preparing a Download

Request
https://api.verystream.com/file/dlticket?file={file}&login={login}&key={key}
Parameters

Name Description Example Required
file File-ID Vxj4mjsK4PX yes
login API-Login s94fa6whsas5pqpw no
key API-Key / API-Password bPtzk9-h2Yz_mzKn no

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
    "ticket": "Vxj4mjsK4PX~~1552168424~n~~0~q75Z2aJg-TYfQgxz8",
    "captcha_url": "https://verystream.com/dlcaptcha/xDS53-Hyqp.png",
    "captcha_w": 140,
    "captcha_h": 70,
    "wait_time": 10,
    "valid_until": "2019-01-23 14:30:00"
}
}
File Info

check the status of a file, e.g. if the file exists

Request
https://api.verystream.com/file/info?file={file}&login={login}&key={key}
Parameters

Name Description Example Required
file File-ID(s), single file or comma-separated (max. 50) Vxj4mjsK4PX,Vxj4mjsK4PX4,Vxj4mjsK4PX5,Vxj4mjsK4PX6 yes
login API-Login s94fa6whsas5pqpw no
key API-Key / API-Password bPtzk9-h2Yz_mzKn no

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
    "Vxj4mjsK4PX3": {
        "id": "Vxj4mjsK4PX3",
        "status": 200,
        "name": "Sintel.mp4",
        "size": 1234,
        "sha1": "d16594b09e7645b1377e85f86b6e873889085059",
        "content_type": "video/mp4",
    },
    "Vxj4mjsK4PX4": {
        "id": "Vxj4mjsK4PX4",
        "status": 500,
        "name": "MyDogVideo.mp4",
        "size": false,
        "sha1": "b2d23b355b1334dad204b1ad759db2f1244402ce",
        "content_type": "video/mp4",
    },
    "Vxj4mjsK4PX5": {
        "id": "Vxj4mjsK4PX5",
        "status": 404,
        "name": false,
        "size": false,
        "sha1": false,
        "content_type": false,
    },
    "Vxj4mjsK4PX6": {
        "id": "Vxj4mjsK4PX6",
        "status": 451,
        "name": "SoMuchDoge.mp4",
        "size": 123456789,
        "sha1": "1196cb255336e16a327d42bde33b078a1678f7de",
        "content_type": "video/mp4",
    }
}
}
Upload

Get an Upload URL

Uploads shall be POSTed to the upload URL returned by our API and shall be multipart/form-data encoded. Example with curl:

curl -F file1=@/path/to/file.txt https://doge.example.com/uls/jAZUhVzeU78

Request
https://api.verystream.com/file/ul?login={login}&key={key}&folder={folder}&sha1={sha1}&httponly={httponly}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw no
key API-Key / API-Password bPtzk9-h2Yz_mzKn no
folder Folder-ID to upload to 1234 no
sha1 Expected sha1
If sha1 of uploaded file doesn't match this value, upload fails
94f34a5d66111993d9e6b653715b15bfd1f08dd4 no
httponly If this is set to true, use only http upload links <not set> no

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
    "url": "https://doge.example.com/uls/fCgaPthr_ys",
    "valid_until": "2019-01-09 00:32:20"
}
}
Add Remote Upload

Remote Uploading a file

Request
https://api.verystream.com/remotedl/add?login={login}&key={key}&url={url}&folder={folder}&headers={headers}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
url Remote URL http://google.com/favicon.ico yes
folder Folder-ID to upload to 1234 no
headers additional HTTP headers, separated by newline (e.g. Cookies or HTTP Basic-Auth) User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36
Cookie: auth=1234doge;
no

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"id": "12",
"folderid": "12345"
}
}
Check Remote Upload Status

Check Status of Remote Upload

Request
https://api.verystream.com/remotedl/status?login={login}&key={key}&limit={limit}&id={id}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
id Remote Upload ID 1234 yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
24: {
    "id": 24,
    "remoteurl": "http://proof.ovh.net/files/100Mio.dat",
    "status": "new",
    "bytes_loaded": null,
    "bytes_total": null,
    "folderid": "12345",
    "added": "2019-01-01 02:20:12",
    "last_update": "2019-01-01 02:21:03",
    "extid": false,
    "url": false
},
22: {
    "id": 22,
    "remoteurl": "http://proof.ovh.net/files/1Gio.dat",
    "status": "downloading",
    "bytes_loaded": "823997062",
    "bytes_total": "1073741824",
    "folderid": "12345",
    "added": "2019-01-01 02:20:12",
    "last_update": "2019-01-01 02:21:03",
    "extid": false,
    "url": false
},
20: {
    "id": 20,
    "remoteurl": "http://google.com/favicon.ico",
    "status": "finished",
    "bytes_loaded": "229",
    "bytes_total": "229",
    "folderid": "1234",
    "added": "2019-01-01 02:20:12",
    "last_update": "2019-01-01 02:21:03",
    "extid": "ANAaeBZus-Q",
    "url": "https://verystream.com/f/ANAaeBZus-Q"
},
3: {
    "id": 3,
    "remoteurl": "http://127.0.0.1/",
    "status": "error",
    "bytes_loaded": "162",
    "bytes_total": "162",
    "folderid": "4",
    "added": "2019-01-01 02:20:12",
    "last_update": "2019-01-01 02:21:03",
    "extid": false,
    "url": false
}
}
}
List Folder/Files

Shows the content of your folders

Request
https://api.verystream.com/file/listfolder?login={login}&key={key}&folder={folder}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
folder Folder-ID 5 no

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
"folders": [
    {
    "id": "34567",
    "name": "RemoteDl"
    },
    {
    "id": "4567",
    "name": "test"
    },
    {
    "id": "567",
    "name": "dogevideos"
    },
    {
    "id": "6789",
    "name": "catvideos"
    },
    {
    "id": "678",
    "name": "memes"
    }
],
"files": [
    {
    "name": "bigbuckbunny.mp4",
    "sha1": "de179ccafa808cabf06cd2e12cd38eb663094e47",
    "folderid": "4567",
    "upload_at": "1552168424",
    "status": "active",
    "size": "5321514545",
    "content_type": "video/mp4",
    "download_count": "848",
    "cstatus": "pending",
    "link": "https://verystream.com/stream/g3YaFjzK/big_buck_bunny.mp4.mp4",
    "linkextid": "g3YaFjzK"
    },
    {
    "name": "Sintel.2010.mkv.mp4",
    "sha1": "75b16e207b52f38019fe5400946ff7b228d94bc1",
    "folderid": "4567",
    "upload_at": "1552168424",
    "status": "active",
    "size": "5321514545",
    "content_type": "video/mp4",
    "download_count": "1337",
    "cstatus": "finished",
    "link": "https://verystream.com/stream/nfseC3vy/Sintel.2010.1080p.mkv.mp4",
    "linkextid": "nfseC3vy"
    }
]
}
}
Create Folder

Creates a new Folder

Request
https://api.verystream.com/file/createfolder?login={login}&key={key}&name={name}&pid={parent}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
name Name of new Folder 12345 no
pid Parent Folder ID (if not set root folder will be used) 12345 no

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": {
    "folderid": 35678
}
}
Rename Folder

Renames a Folder

Request
https://api.verystream.com/file/renamefolder?login={login}&key={key}&folder={folder}&name={name}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
folder Folder ID to delete 12345 yes
name New Name my%20new%20dogevideos yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Delete Folder

Deletes a Folder with all subfolders and all files in it. Be careful!

Request
https://api.verystream.com/file/deletefolder?login={login}&key={key}&folder={folder}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
folder Folder ID to delete 12345 yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Rename File

Renames a File

Request
https://api.verystream.com/file/rename?login={login}&key={key}&file={file}&name={name}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
file File ID to rename g3YaFjzK yes
name New Name dogevideo.mp4 yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Move File

Moves a File into a different folder

Request
https://api.verystream.com/file/rename?login={login}&key={key}&file={file}&folder={folder}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
file File ID to rename g3YaFjzK yes
folder Folder to move in 1234567 yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Delete File

Removes a file

Request
https://api.verystream.com/file/delete?login={login}&key={key}&file={file}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
file File ID to delete g3YaFjzK yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": true
}
Show running file converts

Shows running file converts by folder

Request
https://api.verystream.com/file/runningconverts?login={login}&key={key}&folder={folder}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
folder Folder-ID 5 no

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": [
{
    "name": "MyOldCamera.avi",
    "id": "16544848",
    "status": "pending",
    "last_update": "2019-01-01 04:40:40",
    "progress": 0.13,
    "retries": "0",
    "link": "https://verystream.com/stream/PZqLT792/Geysir.AVI",
    "linkextid": "PZqLT792"
}
]
}
Show failed file converts

Should be unnecessary, if you have problems with convert, send us a message

Get splash image

Shows the video splash image (thumbnail)

Request
https://api.verystream.com/file/getsplash?login={login}&key={key}&file={file}
Parameters

Name Description Example Required
login API-Login s94fa6whsas5pqpw yes
key API-Key / API-Password bPtzk9-h2Yz_mzKn yes
file File-ID 6jQgbWaRR8 yes

Response
200 (OK)
Content-Type: application/json
{
"status": 200,
"msg": "OK",
"result": "https://img.verystream.com/splash/6jQgbWaRR8/8wLWp5xa.jpg"
}
Embed JavaScript API / Player.js Support

You can control an verystream embed using the Player.js Open Standard.

For more details how you can interact with an embed on the client-side using JavaScript see the API Docs of Player.js.

With the Player.js API you can e.g. control the playback and volume of a video.