vıvo's API Documentation

Communication

vıvo's API exposes several methods via a standardized programmatic interface with which you can make automated use of our service and platform like via the website in your browser. This API is RESTful compliant and is accessed by making HTTPS requests to the specific endpoint URL below by using HTTP's GET, POST, PUT, and DELETE methods. Please consider our rate limit of 80 requests per minute when designing your application.

https://vivo.sx/api/v1/…

Authentification

To use all of vıvo's API methods you may have to register an account with us to get an unique API token which is being used for authentification. Methods requiring authentification have an annotation accordingly. If needed you have to attach the API token as additional header named "X-AUTH".

cURL example of a request:

curl -X GET "https://vivo.sx/api/v1/account" \
 -H "Content-Type: application/json" \
 -H "X-AUTH: API_TOKEN_HERE"

Responses

Based on its RESTful design the API will return the status of a response as HTTP status code and the result will be a JSON object.

200 OK - Request was successful
400 BAD REQUEST - Parameters missing or malformed
401 UNAUTHORIZED - Wrong API token
5XX SERVER ERRORS - Not to be expected

Should you experience any 5XX error codes please contact us here and file a detailed bug report.

Account Info

This method provides you with certain information regarding your account by performing a HTTP GET request.
The monthly_* attributes cover the current month respectively. Valid authentification is required.

cURL example of a request:

curl -X GET "https://vivo.sx/api/v1/account" \
 -H "Content-Type: application/json" \
 -H "X-AUTH: API_TOKEN_HERE"

JSON example of a response:

{
 "status":true,
 "result":{
  "name":"…",
  "mail":"…",
  "accessed":"2020-01-01 00:00:01",
  "monthly_views":1000,
  "monthly_dmca":0
 }
}

File Upload

This method requires a two-step action and authentification. At first you have to send a HTTP GET request providing the size in bytes of the file you want to upload. The response will return the final address to which you then upload the file.

cURL example of the first step:

curl -X GET "https://vivo.sx/api/v1/upload/52428800" \
 -H "Content-Type: application/json" \
 -H "X-AUTH: API_TOKEN_HERE"

JSON example of a response:

{
 "status":true,
 "upload_url":"…"
}

cURL example of the second step:

curl -X POST "UPLOAD_URL_HERE" \
 -H "Content-Type: multipart/form-data" \
 -H 'Cache-Control: no-cache' \
 -F action=push \
 -F session=API_TOKEN_HERE \
 -F [email protected]

PLAIN TEXT example of a response:

https://vivo.sx/5ec5b4c…

File Details

This method can be queried by a HTTP GET request with or without authentification. When being used without authentification it will only state whether the requested file exists or not. This is the same case even with authentification if you are not the file owner of the requested file(s) otherwise you will receive additional details. No more than 25 files per request are allowed.

cURL example of a request:

curl -X GET "https://vivo.sx/api/v1/files/5ec5b4c…,…" \
 -H "Content-Type: application/json" \
 -H "X-AUTH: API_TOKEN_HERE"

JSON example of a response:

{
 "status":true,
 "result":{
  "5ec5b4c…":{
   "exists":true,
   "title":"big_buck_bunny.mp4",
   "size":52428800,
   "views":1000,
   "created":"2020-01-01 00:00:00",
   "accessed":"2020-01-02 00:01:00"
  },
  "b5e5d00…":{
   "exists":true
  }
 } }

File Cloning

Files of other vıvo users can be imported into your account as well as your own files can be cloned multiple times by providing the associated file hash(es). These file hashes have to be provided in the URI separated by a comma as a HTTP PUT request with a limit of no more than 25 files per request. This method requires valid authentification.

cURL example of a request:

curl -X PUT "https://vivo.sx/api/v1/files/5ec5b4c…,…" \
 -H "Content-Type: application/json" \
 -H "X-AUTH: API_TOKEN_HERE"

JSON example of a response:

{
 "status":true,
 "result":{
  "5ec5b4c…":{
   "success":true,
   "video_url":"https:\/\/vivo.sx\/2f92c94…",
   "embed_url":"https:\/\/vivo.sx\/embed\/2f92c94…"
  }
 }
}