• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
VdoCipher: Secure Video Hosting for BusinessVdoCipher
☰
Sign Up
  • Features
  • Pricing
  • Testimonials
  • About
  • Contact
Login
Sign Up

C# sample API for video upload from browser to VdoCipher

September 2, 2022 /

To automate your video website platform, you need video upload directly through your website. Read this for details about this method. The following code gives an example written in C#.

C# Sample Code​ for VdoCipher OTP Generation

In this example, the sample videoID is 1234567890, and the API Secret Key is a1b2c3d4e5. The time-to-live for OTP validity is set to 300s in the sample code. You can reference the API documentation for more info.

var client = new RestClient("https://dev.vdocipher.com/api/videos/1234567890/otp");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Apisecret a1b2c3d4e5");
request.AddParameter("undefined", "{\n\t\"ttl\":300\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

The controller makes an API request to VdoCipher API to get authorized data about the upload. View file creates the HTML form required for uploading data. Note that the HTML form is only for illustration. You need to hide the extra input fields and perhaps use one of the better javascript libraries (angularjs, jquery or standalone, etc.) for video upload to make user flow better according to rest of your website.

https://gist.github.com/vibhavsinha/cb35c43b874e52c69dd2

After the video is uploaded, it is not ready instantly. Do not load the player immediately. Use the API to query when video is ready and only then render the video player. The API for querying video status is described in the API reference as videos.

FAQs

How to protect your C# video streaming on the backend?

The security integration of video streaming, like multi-DRM, is not directly available for C# use. The easiest solution would be to use a secure video streaming service provider like VdoCipher and integrate with their APIs compatible with the C# backend.

How to secure API in C#?

API gets used as a documented method of interacting with other services, and that is why there is no exact answer to the question, but applying OAuth and using a shared secret along with the request made can work as generic solutions.

Is C# vulnerable to Video Security lapses?

No, it has nothing to do with video security, as videos get secured through cloud encoding and global distribution via a dynamic key exchange mechanism.

 

Supercharge Your Business with Videos

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

Free 30-day trial →

Filed Under: APIs and Sample Codes, asp, Using VdoCipher Tagged With: C# vdocipher, C# video embed, v2, video embed api

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
  • Portuguese
  • Spanish
  • Arabic

Popular Posts

  • Google Widevine DRM 
  • WordPress video plugin: Add Secure Videos to your WP site
  • Understanding Video Quality – Pixels (p), Bitrate (kbps), Aspect Ratios
  • Add text to video with dynamic watermarking
  • Encrypted Video Streaming: VdoCipher & Others
  • Video Hosting For Online Courses
  • Video Quality: What is Video Bitrate, Pixel & Aspect Ratios 
  • Online Video Player
  • Apple Fairplay DRM
  • Study Apps For Students
  • SVOD VS TVOD VS AVOD
  • DRM Security
  • Exoplayer Tutorial
  • Video Platform Comparison

Recent Top Post

  • Enterprise Video Platform
  • Cloud Video Platform
  • Shaka Player
  • Install FFMPEG on Windows
  • Video Aspect Ratio
  • Video Streaming Protocols
  • Adaptive Bitrate Streaming
  • Elearning Statistics 2021
  • DRM Solution
  • Video Bitrate
  • History Of Youtube
  • React Native Video
  • Video Piracy
Recent Blogs
  • Learning Management System 101: All You Need To Know
  • Cloud Streaming and Cloud Video Platform: A Guide for Modern Media
  • CMAF Streaming Guide to Enhance Video Delivery and User Experience
  • Top LMS (Learning Management System) Platforms, Pros, Cons & User Reviews
  • CENC Common Encryption Methods and Algorithms Guide
  • How to Create & Sell Your Online Video Course – Complete Guide
  • What is DRM Technology, its Working & Video Content Protection Types
  • Video Hosting for WordPress: Secure Customisable Player Plugin
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: Ensure Piracy Protection of Your Videos
Navigation
  • Home
  • Glossary
  • Features
  • About Us
  • Pricing
  • FAQs
  • Terms
  • Privacy Policy
  • Contact US
Industry
  • Education and Training
  • Media and Entertainment
  • DRM and Antipiracy
  • APIs for Developers
  • Video Hosting and Marketing
  • Widevine DRM
  • Video DRM
  • Google DRM
  • DRM license Server
  • Custom Video Player
  • <
Follow Us
We are Amazon AWS Technology Partner for Secure Video Hosting for Business
We use Akamai CDN for Secure Video Streaming for Business

© 2023 VdoCipher Media Solutions Pvt. Ltd.