Channel Recorder API
8min
overview with the channel recorder api you can embed a "record screencast" button any where to upload to your channel on screenpal com for example if you wanted to collect tech support bugs from users on your website standard channel recorder tutorial the api options simply extend the standard channel recorder functionality so you can place the button on your own site/tool instead of requiring users to visit our hosted page for the launch these also allow for additional functions such as callbacks, outlined below prerequisite to use the recorder api you need the recorder api enabled plan team business with 25 or more creators on plan team education with 100 or more creators on plan please contact sales\@screenpal com to purchase/upgrade your plan if you cannot upgrade your plan in your hosting settings getting started take a look at our tutorial on setting up an embedded recorder which goes over how to get started by creating a channel on your screenpal com account setting up the recorder to embed copy and paste javascript for recorder into your html javascript settings when you embed the javascript you can add some extra settings, using customdata and callback as exampled below \<script type="text/javascript" id="som recorder recorderid" src="//screencast o matic com/api/som js"> \</script>\<script type="text/javascript"> som recorder({ id "recorderid", customdata {"key1" "value1", "key2" "value2" }, callback function(screencast) { } }) embed(); \</script> customdata setting a customdata object with key/value pairs will save the data so it's passed back in the callback function and in json for the webhook if you have one defined (see more about webhook callback below) callback setting a callback function will allow you to receive a javascript callback after the recorder is closed if a screencast is uploaded from the recorder then the function will be called back with a javascript object containing details for the upload or undefined if no screencast was uploaded when using the javascript callback, the end user should not navigate away from the page where the recorder is launched or else the javascript callback won't be called the javascript object will contain the following details { "id" "screencastid", "title" "title entered by user", "description" "description entered by the user (or empty string if nothing was given)", "customdata" { customdata you provided if any } } if you also check the box in your recorder settings to " include links and embed tag in javascript callback " then you also get links and an embed tag to what was uploaded { "id" "screencastid", "title" "title entered by user", "description" "description entered by the user (or empty string if nothing was given)", "customdata" { customdata provided in javascript }, "watchlink" "http //link/ to the playback page for the upload", "channellink" "http //link/ to the channel page for the upload", "downloadlink" "http //link/ to download the mp4 for upload which expires after 1 hour", "embedtag" "\<frame>tag to embed a player for the upload\</frame>" } webhook callback you can set up a webhook callback so a post request is made from our servers back to your system when an upload is made you can supply either an http or https url which can also be prefixed with a username and password for basic authentication like username\ password\@http // the post request will contain json with the same data provided in the javascript callback with all the links to the upload that was created like { "id" "screencastid", "title" "title entered by user", "description" "description entered by the user (or empty string if nothing was given)", "customdata" { customdata provided in javascript }, "watchlink" "http //link/ to the playback page for the upload", "channellink" "http //link/ to the channel page for the upload", "downloadlink" "http //link/ to download the mp4 for upload which expires after 1 hour", "embedtag" "\<frame>tag to embed a player for the upload\</frame>" } if the system fails to post to your server then it will retry until it successfully posts