Adding videos from URL

You can easily add videos saved in your server to your vdocipher account. All you need is a publicly accessible link to the media file. This videos will be ready to use in your vdocipher dashboard.

Import URL API call:

POST  https://api.vdocipher.com/v2/importURL?url=<url_encoded_link>

PostData: clientSecretKey=CLIENT_SECRET_KEY

Replace the CLIENT_SECRET_KEY with the API key provided on sign-up.

Returns:

{
    id: "---------------",
    status: "Queued"
}

The returned data can be either XML or JSON. This will tell you the id of the newly created video. Note that after adding, it can take up to five to fifteen minutes for the video to be ready. You need to query the status of added videos using this id and the /videos API end-point described in API docs . The status of the video changes from “Queued” to “Processing” to “ready”.

This API call can be used to dynamically upload videos from your server. If you are using Amazon S3, you can use the getObjectURL() method to get a temporary URL to a private object.

Note 1: Keep the URL active for at least 5 hours since the adding because we might need it to do some post-processing optimization and retries in case of any errors.

Note 2: Make sure that the URL query string is properly encoded, use functions like urlencode() in PHP or ERB::Util.url_encode() in Ruby or urllib.urlencode() in python to properly encode the URL before passing it to the query string.

Note 3: Make sure to add the protocol for the URL which should be either http:// or https:// . Upon properly encoding, this shall look something like https%3A%2F%2F

Writing this blog prompted me to search that URI vs URL. Which should be the right/better term to use in this post? I read through https://danielmiessler.com/study/url_vs_uri/ and found that since in this API call, it is imperative to specify the protocol. Hence, it shall be better to call it URL.

You may also like...