Skip to main content

Installation

Setup your API Key#

To obtain an API key, create partner account.

After approval from our team, your API key will be created.

You will need this API key in the next step.

To copy your API key, navigate to VideoForm Partner Dashboard

Copy the script tag#

Add the below code before closing your </body> tag

script
<script>   (function(w, d, s, o, f, js, fjs) {            w['VideoForm'] = o;            w[o] = w[o] || function() {                (w[o].q = w[o].q || []).push(arguments)            };            js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];            js.id = o;            js.src = f;            js.dataset.id = 'XXXX-XXXXX-XXXXX-XXXXX';            js.async = 1;            fjs.parentNode.insertBefore(js, fjs);        }(window, document, 'script', 'vf', 'https://assets.videoform.com/videoformapi.js'));</script>

Create Record Button#

Create a button in HTML and call the Record API screen on button click.

html
<button id= "vf_record_btn"> Record </button>
Note:

If you want to use your own <button> or <div>, just make sure the id is vf_record_btn

Add Event Listeners#

Function to open VideoForm Record Screen
VideoForm.open()
Function Triggered after a Video has been uploaded
window.onload = function() {  VideoForm.on("video_submitted", async video => {    // handle video details     // console.log('video response', video)  });}
Function to close VideoForm Record Screen
VideoForm.close()