• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
VdoCipher: Secure Video Hosting for BusinessVdoCipher
☰
Sign Up
  • Solutions
    • E-learning
    • Enterprise
    • Developer
    • Healthcare
    • Live Streaming
  • Features
  • Pricing
    • Video Hosting & DRM Solution
    • Live Streaming Solution
  • Live
  • Developer
  • About
    • Testimonials
    • The Company
  • Contact
Login
Sign Up

Video upload from website or server to VdoCipher API

February 2, 2016 /

[Update 24/05/2018] This blog has been updated for API Version v3. A previous version of this blog used API v2. If you are using API v2 you can contact us at support@vdocipher.com. You can use VdoCipher API v3 to build a workflow around your video website as suggested in this blog. The complete API v3 reference, with sample codes for different backend languages, can be accessed from the API Sample Docs.

We use Amazon AWS storage to store original user videos securely in AWS S3. With an intent to automate their online business, many of our customers wish to allow their users to upload videos directly from their website. To enable this, we have an API call that returns an authenticated policy document which is used video upload into a S3 bucket allotted to your account.

Step 1 (Obtain authorized access):

Create authorized video upload request with your API secret key.

Request
Endpoint: https://dev.vdocipher.com/api/videos?title=videotitile
Method: PUT
HEADER: Authorization: Apisecret a1b2c3e4e5d6
Response
Content-Type: application/json
"clientPayLoad":{
 "policy":
 "key":
 "x-amz-signature": ,
 "x-amz-algorithm": ,
 "x-amz-date": ,
 "x-amz-credential": ,
 "policy":  ,
 "upload_link_secure": ,
}
"video_id":

The API call has returned a set of parameters that must go with the video upload call to the AWS S3 endpoint. We shall refer to this JSON object returned above as uploadData.

The policy document is valid only for the next 1 hour. It is recommended to make the video upload immediately after creating the authorized access. There is also a soft restriction on the number of upload calls every hour, so it is advised to create it only after the user has chosen to upload the video. It should not be made every time somebody loads their dashboard or mobile app.

This call must be made from a secure environment such as your server. This should not be called from a mobile device or the browser to protect your API key. The uploadData should then be passed to user’s device (mobile or browser) to do the file upload.

Step 2 (Video upload via S3 API):

Upload the file to amazon s3 directly. This upload can be made using server code or using an HTML5 form. You can use any third party upload library to make the upload script. The famous ones already have tutorials on setting it up with S3 upload.

application Request
Endpoint: https://{bucket}.s3.amazonaws.com/
Method: POST
Form-Data:
 'x-amz-credential': uploadData['x-amz-credential'],
 'x-amz-algorithm': uploadData['x-amz-algorithm'],
 'x-amz-date' : uploadData['x-amz-date'],
 'x-amz-signature': uploadData['x-amz-signature'],
 'key' : uploadData['key'],
 'policy' : uploadData['policy'],
 'success_action_status' : 201,
 'success_action_redirect' : 'http://example.com'
 'file': <file content>
  • upload_link_secure string – The vdocipher storage location on S3 that has been allocated for this file
  • x-amz-credential string – These must be accompanied in the upload request.
  • x-amz-algorithm string
  • x-amz-date string
  • x-amz-signature string – A signature value that authorizes the form and proves that only vdocipher could have created it.
  • key string – A name for the S3 object that will store the uploaded file’s data
  • policy string – authorization string
  • success_action_status integer – The status code returned upon successful upload if success_action_redirect is not specified.
  • success_action_redirect string – Specifies if to redirect to a URL after a successful post instead of issuing a 201. Set this to an empty string if you do not want to redirect to a specific page.

If everything goes right, the response from the above request should be:

Response
<?xml version="1.0" encoding="UTF-8"?>
<PostResponse>
  <Location>https://{{bucket}}.s3.amazonaws.com/orig%2F5555555555555</Location>
  <Bucket>vdo-ap-southeast</Bucket><Key>orig/5555555555555</Key>
  <ETag>xxxxxxxxxxxxxxxxxx</ETag>
</PostResponse>

You can ignore the content of this response. Now, the video status should be shown as Queued or Processing in the API or on your dashboard. The video will get processed after some time. You can poll the API or configure the web hooks(coming soon) to know the time when video is ready. You should only load the video player if the video is ready.

 

Some sample code for the above operations:

  • PHP
  • C#

The complete VdoCipher API reference for Server APIs, player embedding and player customizations can be accessed through the API page. You can use VdoCipher API v3 to build a workflow around your video website as suggested in this blog.

Supercharge Your Business with Videos

At VdoCipher we maintain the strongest content protection for videos. We also deliver the best viewer experience with brand friendly customisations. We'd love to hear from you, and help boost your video streaming business.

Free 30-day trial →
Decorative Circle

Filed Under: APIs and Sample Codes ASP PHP Technology Using VdoCipher Tagged With: api upload api upload video api v2

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Secure Your Videos

Blog Categories

  • DRM 
  • APIs and Sample Codes
  • WordPress
  • E-learning
  • Media
  • Video Tech

Popular Posts

  • Google Widevine DRM
  • WordPress video plugin
  • Video Quality
  • Dynamic Watermarking
  • Encrypted Video Streaming
  • Video Hosting For Online Courses
  • Online Video Player
  • Apple Fairplay DRM
  • SVOD VS TVOD VS AVOD
  • Exoplayer
  • DRM

Top Recent Posts

  • Enterprise Video Platform
  • Cloud Video Platform
  • Video Player for Android
  • DRM Solution
  • Video Bitrate
  • React Native Video
  • Video Piracy
  • Learning Management System
  • AVPlayer
  • Live Streaming Websites
  • DRM Providers
  • DRM Security
  • Private Video Hosting
  • HTML5 Video Player

Schedule Demo Link
Popular Blogs
  • How many use easy video download piracy tools ?
  • Apple FairPlay DRM : Video Protection on iOS & Safari
  • 12 Video Piracy Statistics, 6 Prevention Methods
  • Elearning Video Protection from Piracy
  • Content Creator Economy Growth and other Statistics Report
  • Top 21 Education Apps In India For Online Learning
  • How To Embed Videos in WordPress A Comprehensive Guide
  • Live Streaming Platform For E-learning Media & Broadcast
  • Explained in Simple Language, 32 Key DRM Encryption Terminologies
  • Best Video Player for Android Comparison 2024
Recent Blogs
  • Best Video Frame Rate or FPS for Cinematic Movies, 4K, YouTube & Instagram
  • Content Creator Economy & Growth Creator Statistics Report 2025
  • How to Build a Flutter Live Streaming Application?
  • How To Prevent Video Download From Your Website?
  • DRM Server Solutions with Widevine License and Apple FairPlay
  • Top 12 Live Streaming Platforms: All You Need To Know in 2025
  • Best DRM Tools to protect your Videos & other Digital Assets
  • Top DRM Products Overview as Software Service and Hardware
Featured Blogs
  • Online Video Player
  • Video Encryption
  • Video Protection
  • Video Hosting
  • Widevine DRM
  • Fairplay DRM
  • Video Quality
  • Online Video Platform
  • Video hosting for business
Comparison
  • VdoCipher vs Vimeo
  • VdoCipher vs Dacast
  • VdoCipher vs YouTube
  • VdoCipher vs Zoom
  • VdoCipher vs JW Player
  • VdoCipher vs Dacast Live
    Contact Us
  • Phone : +91 7619171878
  • Whatsapp : +91 7042238654
  • E-mail : support@vdocipher.com
Company
  • Home
  • Glossary
  • Features
  • About Us
  • Pricing
  • FAQs
  • Contact
Services
  • Enterprise
  • E-Learning
  • Developer
  • Healthcare
  • Live Streaming Platform
  • Video Analytics
  • Media and Entertainment
  • DRM and Antipiracy
  • APIs for Developers
  • Video Hosting
  • Video API
  • Video DRM
  • Google DRM
  • DRM License Server
  • Custom Video Player
  • Play Integrity
Countries Served
  • Secure Video Hosting in USA
  • Secure Video Hosting in India
  • Secure Video Player in Brazil
  • Secure Video Streaming in UK
  • Secure Video Streaming in Saudi Arabia
  • Video Encryption in Spain
  • Video Encryption in Italy
  • Protected Video Streaming in Indonesia
  • Encrypted Video Player in Canada
  • Protected Video Streaming in Australia
  • Encrypted Video Player in Germany
  • Video DRM for Sri Lanka
  • Video DRM for Middle East
  • DRM Encryption for Europe
  • DRM Encryption for Asia
  • DRM Solutions for Japan
  • DRM Solutions for UAE
  • DRM Software for Chile
  • DRM Software for Russia

Copyright © 2025 VdoCipher. All rights reserved.

  • Terms
  • Privacy Policy