We provide the option to communicate with a web server whenever a video is done processing using webhooks.
Adding a Webhook
- Log in to your account and move your mouse over the person icon in the top right and click ‘Account Settings’ in the dropdown menu.
- Click on the ‘API’ tab
- Enter your URL in the Webhook URL and click Update Video Setting.
The Payload
When a video is done processing, we’ll POST to your URL with a payload of JSON-encoded data about the video. Here is an example of the result:
{ "created_at": "2012-12-20T00:07:54-05:00", "updated_at": "2012-12-20T00:07:54-05:00", "height": null, "width": null, "description": "An new video", "id": "a098d2bbd33e1c328", "sd_video_file_size": 0, "plays": 0, "title": "new upload.mov", "source_video_file_size": 0, "hd_video_file_size": 0, "embed_code": "<iframe class='sproutvideo-player' type='text/html' src='https://videos.sproutvideo.com/embed/a098d2bbd33e1c328/7ca00d6d622a8e8d?type=sd' width='630' height='354' frameborder='0' allowfullscreen referrerpolicy='no-referrer-when-downgrade'></iframe>", "state": "inspecting", "security_token": "7ca00d6d622a8e8d", "progress": 0, "tags": [], "duration": null, "password": null, "privacy": 2, "assets": { "videos": { "hd_video_url": null, "sd_video_url": null, "source_video_url": null }, "thumbnails": [], "poster_frames": [] } }
This is sent as a POST as the POST body.
Troubleshooting
We recommend using RequestBin to troubleshoot WebHooks.
Other articles in the Uploading section:
- How to Upload MP3 Audio Files to SproutVideo
- How to Clone a Video or Live Stream
- How to Import Videos from Dropbox, Google Drive, OneDrive, or Box
- What Formats Does SproutVideo Accept?
- How to Upload a Video, or Multiple Videos at One Time
- How Many Videos Can You Upload at One Time?
- How Large Can Your Videos Be?