Skip to main content

Obtain credentials before upload

API endpoint to send HTTP PUT request to receive upload credentials is https://dev.vdocipher.com/api/videos. To initiate video upload you would need to pass the title of video as a query string: https://dev.vdocipher.com/api/videos?title=videotitle where videotitle is the title of the video.

Optionally, you can also pass folder ID in the query parameter to upload video inside a specific folder. If no folder ID is pass then default folder ID root in considered.

Folder id can be copied from dashboard as shown below:

This API returns a JSON object, which authorizes you to initiate upload. You may upload the file yourself, or can pass the upload credentials to your content providers who can then upload videos to your account. The JSON object looks like this:

The values received in upload policy are presented in the following format - {{policy}}

{
"clientPayload": {
"policy": "{{format}}",
"key": "{{key}}",
"x-amz-signature": "{{x-amz-signature}}",
"x-amz-algorithm": "{{x-amz-algorithm}}",
"x-amz-date": "{{x-amz-date}}",
"x-amz-credential": "{{x-amz-credential}}",
"uploadLink": "https://{s3-bucket-url}}.amazonaws.com"
},
"videoId": "1234567890"
}

Obtain Credentials Sample Code​

Use the language tab on top-right to choose your server language.

The API Secret Key is a1b2c3d4e5 and sample folder ID is ca038407e1b0XXXXXXXXXXXXXXXXXXXX.

curl -X PUT \
'https://dev.vdocipher.com/api/videos?title=title&folderId=ca038407e1b0XXXXXXXXXXXXXXXXXXXX' \
-H 'Authorization: Apisecret a1b2c3d4e5'