


{"id":13944,"date":"2018-03-07T05:30:14","date_gmt":"2018-03-07T05:30:14","guid":{"rendered":"https:\/\/expressplay.local\/?page_id=13944"},"modified":"2021-01-29T10:17:28","modified_gmt":"2021-01-29T18:17:28","slug":"tutorial-test-token-legacy","status":"publish","type":"page","link":"https:\/\/www.expressplay.com\/ja\/developer\/tutorial-test-token-legacy\/","title":{"rendered":"Tutorial: Test Token Generation (Legacy)"},"content":{"rendered":"<style type=\"text\/css\">\n    hr {\n        margin: 20px 0;\n    }<\/p>\n<p>    code {\n        word-break: break-all;\n        white-space: pre-wrap;\n        font-size: 14px;\n        color: #555;\n        margin: 20px 0;\n    }\n<\/style>\n<div style=\"border: 1px solid #ddd; padding: 20px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -khtml-border-radius: 5px; margin-bottom: 20px;\">\n<div >\n<h3 style=\"margin-top: 5px;\">\n       <span style=\"font-weight: 600;\">NOTE:<\/span> We\u2019ve recently updated our service. <a href=\"\/ja\/developer\/portal-update\/\">\u3082\u3063\u3068\u8a73\u3057\u304f\u77e5\u308b<\/a><br \/>\n      <\/h3>\n<p>\n        If we\u2019ve not yet migrated you to the new service,<br \/>\n              <a href=\"\/ja\/developer\/tutorial-test-token\/\" class=\"link-arrow\" style=\"color: #1b589e;\"><br \/>\n        click here to see the <strong>Current<\/strong> Test Token Generation Tutorial<br \/>\n<\/a>\n      <\/p>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"flex flex-wrap -mx-6\">\n<div class=\"w-full lg:w-7\/12 px-6\">\n<h2>Test Token Generation (Legacy)<\/h2>\n<h4 style=\"font-size:18px; font-weight: 400;\">This tutorial explains the two methods available for generating Test Tokens.<\/h4>\n<div class=\"bg-grey-100 p-8 mb-12\">\n<h4 style=\"margin-bottom: 10px; font-weight: 400; font-size: 20px;\">Requirements<\/h4>\n<ul class=\"tutorial_container\">\n<li>Packaged Content<\/li>\n<li>Content Key<\/li>\n<li>Content ID<\/li>\n<li>Content Location (URL)<\/li>\n<li>Test Authenticator<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"w-full lg:w-5\/12 px-6\">\n      <img decoding=\"async\" src=\"\/wp-content\/uploads\/2017\/08\/developer-cloud-large.png\" alt=\"\"\/>\n<\/div>\n<\/div>\n<hr \/>\n<div class=\"mb-12 mt-12\">\n<p>Method 1 &#8211; Generating Test Tokens with ExpressPlay Admin<\/p>\n<\/div>\n<p><span style=\"font-size:15px\">To create an MS3 Token with the ExpressPlay Admin you must provide the token with the Content ID, Content Key and Content URL. The Content ID and Content Key are both created when packaging content; the Content URL is the hosting location of the packaged content. MS3 tokens require a special Content ID, this takes the form of <\/span><em>urn:marlin:kid:&lt;value&gt;<\/em><span style=\"font-size:15px\"> with &lt;value&gt; being the same hexadecimal value used for the property value when packaging content. A full Content ID for MS3 Token generation would be:  <\/span><em>urn:marlin:kid:12341234123412341234123412341234<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2018\/03\/ep-createtoken-legacy.png\" alt=\"\"  \/><\/p>\n<p><span style=\"font-size:15px\">To create a token for a piece of media, paste the full Content ID as described above into the Content ID field, the Content Key into the Content Key field, and the Content URL into the URL field. See the working examples below.<\/span><\/p>\n<div class=\"bg-grey-100 p-8 mb-12 mt-12\">\n<code>Service Mode = Test<br \/>\nCustomer Authenticator = 793,adf05681cff44bc58ab24fadd7876e42 (change to yours)<br \/>\nContent ID = urn:marlin:kid:67895432987623454756654729382341<br \/>\nContent Key = 43210987123478904321098712340987<br \/>\nContent URL = https:\/\/www.expressplay.com\/ep\/video\/ExpressPlayerDASH-BBB\/stream.mpd<\/code>\n<\/div>\n<div class=\"bg-grey-100 p-8 mb-12 mt-12\">\n<code>Service Mode = Test<br \/>\nCustomer Authenticator = 793,adf05681cff44bc58ab24fadd7876e42 (change to yours)<br \/>\nContent ID = bigbuckbunnyhls<br \/>\nContent Key = 12345678123456781234567812345678<br \/>\nContent URL = hls:\/\/www.expressplay.com\/ep\/video\/HLSBBB\/master.m3u8<\/code>\n<\/div>\n<p><span style=\"font-size:15px\">For BB tokens, the required fields are a bit different. You don&#8217;t need the content URL, but you do need to include a rightsType parameter which can be BuyToOwn or Rental.<\/span><\/p>\n<div class=\"bg-grey-100 p-8 mb-12 mt-12\">\n<code>Service Mode = Test<br \/>\nCustomer Authenticator = 793,adf05681cff44bc58ab24fadd7876e42 (change to yours)<br \/>\nContent ID = bigbuckbunnyhls<br \/>\nContent Key = 12345678123456781234567812345678<br \/>\ntokenType = BuyToOwn<br \/>\nactionTokenType = 1<\/code>\n<\/div>\n<p>Note: In the case of HLS content, you use the &#8216;hls:\/\/&#8217; protocol identifier in the contentURL parameter. For DASH and MP4, you use http or https as appropriate. In the case of the HLS example above you should get a token similar to the one below<\/p>\n<div class=\"bg-grey-100 p-8 mb-12 mt-12\"><code>https:\/\/ms3.test.hostedmarlin.com:8443\/hms\/ms3\/rights\/?b=ABEAAwAAAzkAB2dpbGRyZWQ_eAAQpFUJY-8_OCZ5wYY6y2gAmABQkInGCpdtGEh3za2455x3QGYTXyuDsz8pmwOWJWyPPT3mH2AGv89GD-Ym6si8I_GCgn6LwZScs9YgyrLQiTwDcdMfNOLxjlh8_5YXMNdTW-4AAAAUN6OKj0O7JPT1aKnnLX1md52iL8k#hls%3A%2F%2Fd31lwto7rjo21l.cloudfront.net%2Fvideo%2FHLSBBB%2Fmaster.m3u8<\/code><\/div>\n<hr \/>\n<div class=\"mb-12 mt-12 clearfix\">\n<p>Method 2 &#8211; Generating Test Tokens with the REST API<\/p>\n<\/div>\n<p>Full API documentation can be found <a target=\"_blank\" href=\"\/ja\/developer\/restapi\/\" rel=\"noopener noreferrer\">here<\/a>. This guide demonstrates the MS3 Token Request API which requires your Test Authenticator, found at <a target=\"_blank\" href=\"https:\/\/admin.expressplay.com\/\" rel=\"noopener noreferrer nofollow\">admin.expressplay.com<\/a>, the content key used to encrypt the piece of content, the content&#8217;s property &lt;value&gt; used when packaging the content, and the content hosting location in URL form. This information is formatted into a RESTful POST or GET request similar to the one demonstrated below.<\/p>\n<p><strong>Note:<\/strong> The Test Authenticator is used as the customerAuthenticator value in the REST API as demonstrated below using the same parameters as the ExpressPlay Admin example for DASH.<\/p>\n<div class=\"bg-grey-100 p-8 mb-12 mt-12\"><code>https:\/\/ms3-gen.test.expressplay.com\/hms\/ms3\/token?customerAuthenticator=793,adf05681cff44bc58ab24fadd7876e42&amp;contentId=urn:marlin:kid:67895432987623454756654729382341&amp;contentKey=43210987123478904321098712340987&amp;contentURL=https:\/\/www.expressplay.com\/ep\/video\/ExpressPlayerDASH-BBB\/stream.mpd<\/code><\/div>\n<p><span style=\"font-size:15px\">Note: In the case of HLS content, you should use the &#8216;hls:\/\/&#8217; protocol identifier in the contentURL parameter. For DASH and MP4, you use http or https as appropriate. In the case of the DASH example above you should get an MS3 token similar to the one shown below.<\/span><\/p>\n<div class=\"bg-grey-100 p-8 mb-12 mt-12\"><code>https:\/\/ms3.test.hostedmarlin.com:8443\/hms\/ms3\/rights\/?b=AAwAAwAAAxkAAlRXPGAAECBR0l7K6dxdkxUSrLNplXUAcDb87DeJyouvcWEmW_-VnmUCGj3vNRJP5f3R_455AWnHcflhQYwJ-O1XUvJYJGK_xtVeEXdJ6DFnwSyo5sRo0ewSCcp-S3MDZGtH2KvXzPBawG45q-VUIc9h2qBpjlnbmqzDkSXpNDm8SwKE0v2MzY0AAAAU6O8AXt97WK0NMFGHgfcAidReoRE#https%3A%2F%2Fwpengine.intertrust.com%2Fep%2Fvideo%2FExpressPlayerDASH-BBB%2Fstream.mpd<\/code><\/div>\n<p><span style=\"font-size:15px\">And for BB tokens the base url is a bit different, and the parameters are same as the above BB example with the addition of a required actionTokenType=1 parameter to indicate that this is for a BB license token.<\/span><\/p>\n<div class=\"bg-grey-100 p-8 mb-12 mt-12\"><code>https:\/\/bb-gen.test.expressplay.com\/hms\/bb\/token?customerAuthenticator=793,adf05681cff44bc58ab24fadd7876e42&amp;contentId=urn:marlin:kid:67895432987623454756654729382341&amp;contentKey=43210987123478904321098712340987&amp;rightsType=BuyToOwn&amp;actionTokenType=1<\/code><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>NOTE: We\u2019ve recently updated our service. Learn more If we\u2019ve not yet migrated you to the new service, click here to see the Current Test Token Generation Tutorial Test Token Generation (Legacy) This tutorial explains the two methods available for generating Test Tokens. Requirements Packaged Content Content Key Content ID Content Location (URL) Test Authenticator Method 1 &#8211; Generating Test Tokens with ExpressPlay Admin To create an MS3 Token with the ExpressPlay Admin you must provide the token with the Content ID, Content Key and Content URL. The Content ID and Content Key are both created when packaging content; the Content URL is the hosting location of the packaged content. [&hellip;]<\/p>\n","protected":false},"author":124,"featured_media":0,"parent":10924,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-expressplay-developer.php","meta":{"_acf_changed":false,"footnotes":""},"tax_page_type":[512],"coauthors":[621],"class_list":["post-13944","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/pages\/13944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/users\/124"}],"replies":[{"embeddable":true,"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/comments?post=13944"}],"version-history":[{"count":0,"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/pages\/13944\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/pages\/10924"}],"wp:attachment":[{"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/media?parent=13944"}],"wp:term":[{"taxonomy":"tax_page_type","embeddable":true,"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/tax_page_type?post=13944"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.expressplay.com\/ja\/wp-json\/wp\/v2\/coauthors?post=13944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}