{"id":4632,"date":"2019-10-07T12:43:40","date_gmt":"2019-10-07T12:43:40","guid":{"rendered":"https:\/\/www.vdocipher.com\/blog\/?page_id=4632"},"modified":"2023-03-12T15:37:21","modified_gmt":"2023-03-12T15:37:21","slug":"webhooks-get-video-status-via-api-tutorial","status":"publish","type":"page","link":"https:\/\/www-uat.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/","title":{"rendered":"Webhooks to get video status via API: Tutorial"},"content":{"rendered":"<div style=\"padding-top:56.25%;position:relative;\">\n<iframe src=\"https:\/\/player.vdocipher.com\/v2\/?otp=20160313versUSE3130MW32XmKpmJeLT1Whf0lKbsBen29tDF7aHRNFICJsld2TB&#038;playbackInfo=eyJ2aWRlb0lkIjoiNDJkYzVhYzVhYTk4NDFlMTkzZThlNmNiMmY1NmM3YzUifQ==\" style=\"border:0;max-width:100%;position:absolute;top:0;left:0;height:100%;width:100%;\" allowFullScreen=\"true\" allow=\"encrypted-media\"><\/iframe>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Using web-hooks<\/h2>\n<p>Whenever a video is ready, our servers will send a POST request to the URL that you specify here. This provides a notification to your server so that you can take relevant actions e.g. publishing the video on your website or sending notifications to your viewers.<\/p>\n<h3>HTTP POST properties<\/h3>\n<p>The POST will be a json body and the content-type request header will be<code>application\/json<\/code>. The JSON object will have the following properties. Note that new keys might be added in future without notice and you should not have a direct dependency to having an absolute structure when parsing this JSON.<\/p>\n<pre><code class=\"code-highlighted code-json\">\r\n        {\r\n          \"hookId\": \"______unique id of this hook______\",\r\n          \"event\": \"video:ready\",\r\n          \"time\": 1538330269833,\r\n          \"payload\": {\r\n          \"id\": \"___video id____\",\r\n          \"title\": \"___ video title ___\",\r\n          \"upload_time\": 1538329973,\r\n          \"tags\": null,\r\n          \"length\": 160,\r\n          \"status\": \"ready\"\r\n        }\r\n      <\/code><\/pre>\n<h3>Authentication<\/h3>\n<p>It is a good idea to add a simple authentication parameter to the URL so that you can be sure that someone else is not sending a fake video-ready event. Here is an example of doing so.<\/p>\n<pre><code>http:\/\/example.com\/video-is-ready.php?token=49eb0c0b29529216bab89627<\/code><\/pre>\n<p>With a URL like this, you can verify the token in your server application to verify that the POST request has indeed come from Vdocipher servers.<\/p>\n<p>Text tutorial<\/p>\n<p><strong>These are the steps you need to follow-<\/strong><\/p>\n<p>1- Go to the &#8220;<a href=\"https:\/\/www.vdocipher.com\/dashboard\/config\" target=\"_blank\" rel=\"noopener noreferrer\">Config and Security<\/a>&#8221; section.<\/p>\n<p>2- Click on the &#8220;Web Hooks&#8221; option<\/p>\n<p>3- Click on the &#8220;Create New Hook&#8221;<\/p>\n<p>4- Enter the URL you want to add and click on &#8220;Create Web Hook&#8221; (Url must begin with HTTP or https)<\/p>\n<p>5- And your Web Hook will be created.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Using web-hooks Whenever a video is ready, our servers will send a POST request to the URL that you specify here. This provides a notification to your server so that you can take relevant actions e.g. publishing the video on your website or sending notifications to your viewers. HTTP POST properties The POST will [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":{"0":"post-4632","1":"page","2":"type-page","3":"status-publish","5":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.0 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Webhooks to get video status via API: Tutorial - VdoCipher Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Webhooks to get video status via API: Tutorial\" \/>\n<meta property=\"og:description\" content=\"&nbsp; Using web-hooks Whenever a video is ready, our servers will send a POST request to the URL that you specify here. This provides a notification to your server so that you can take relevant actions e.g. publishing the video on your website or sending notifications to your viewers. HTTP POST properties The POST will [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"VdoCipher Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vdociphertech\/\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-12T15:37:21+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@vdocipher\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/\",\"name\":\"Webhooks to get video status via API: Tutorial - VdoCipher Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#website\"},\"datePublished\":\"2019-10-07T12:43:40+00:00\",\"dateModified\":\"2023-03-12T15:37:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vdocipher.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhooks to get video status via API: Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#website\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/\",\"name\":\"VdoCipher Blog\",\"description\":\"Secure Video Streaming\",\"publisher\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vdocipher.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#organization\",\"name\":\"VdoCipher\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png\",\"contentUrl\":\"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png\",\"width\":1625,\"height\":1925,\"caption\":\"VdoCipher\"},\"image\":{\"@id\":\"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vdociphertech\/\",\"https:\/\/x.com\/vdocipher\",\"https:\/\/www.linkedin.com\/company\/vdocipher\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Webhooks to get video status via API: Tutorial - VdoCipher Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Webhooks to get video status via API: Tutorial","og_description":"&nbsp; Using web-hooks Whenever a video is ready, our servers will send a POST request to the URL that you specify here. This provides a notification to your server so that you can take relevant actions e.g. publishing the video on your website or sending notifications to your viewers. HTTP POST properties The POST will [&hellip;]","og_url":"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/","og_site_name":"VdoCipher Blog","article_publisher":"https:\/\/www.facebook.com\/vdociphertech\/","article_modified_time":"2023-03-12T15:37:21+00:00","twitter_card":"summary_large_image","twitter_site":"@vdocipher","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/","url":"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/","name":"Webhooks to get video status via API: Tutorial - VdoCipher Blog","isPartOf":{"@id":"https:\/\/www.vdocipher.com\/blog\/#website"},"datePublished":"2019-10-07T12:43:40+00:00","dateModified":"2023-03-12T15:37:21+00:00","breadcrumb":{"@id":"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vdocipher.com\/blog\/webhooks-get-video-status-via-api-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vdocipher.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Webhooks to get video status via API: Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/www.vdocipher.com\/blog\/#website","url":"https:\/\/www.vdocipher.com\/blog\/","name":"VdoCipher Blog","description":"Secure Video Streaming","publisher":{"@id":"https:\/\/www.vdocipher.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vdocipher.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vdocipher.com\/blog\/#organization","name":"VdoCipher","url":"https:\/\/www.vdocipher.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png","contentUrl":"https:\/\/www.vdocipher.com\/blog\/wp-content\/uploads\/2016\/11\/VdoCipher-logo2.png","width":1625,"height":1925,"caption":"VdoCipher"},"image":{"@id":"https:\/\/www.vdocipher.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vdociphertech\/","https:\/\/x.com\/vdocipher","https:\/\/www.linkedin.com\/company\/vdocipher"]}]}},"yoast":{"focuskw":"","title":"","metadesc":"","linkdex":"","metakeywords":"","meta-robots-noindex":"","meta-robots-nofollow":"","meta-robots-adv":"","canonical":"","redirect":"","opengraph-title":"","opengraph-description":"","opengraph-image":"","twitter-title":"","twitter-description":"","twitter-image":""},"_links":{"self":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/pages\/4632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/comments?post=4632"}],"version-history":[{"count":4,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/pages\/4632\/revisions"}],"predecessor-version":[{"id":13602,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/pages\/4632\/revisions\/13602"}],"wp:attachment":[{"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/media?parent=4632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/categories?post=4632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www-uat.vdocipher.com\/blog\/wp-json\/wp\/v2\/tags?post=4632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}