Developers     Developer center

Developer center

under hero banner

NOTE: We’ve recently updated our service. Learn more

If we’ve not yet migrated you to the new service,
click here to see the Legacy Token Generation Tutorial

Token Generation

This tutorial explains the two methods available for generating Test Tokens.

Requirements

Tokens are generated using the ExpressPlay REST API, Full API documentation can be found here. Use of the API requires either your Test or Production Customer Authenticator, found at https://portal.expressplay.com

ExpressPlay

Generating MS3 Tokens with the REST API


In addition the a Customer Authenticator the MS3 Token Request API, requires the content key, Content ID and the content hosting location in URL form.


The parameters should be formatted into a RESTful POST or GET request similar to how the list of parameters below is formated to create the subsequent RESTful call.

Content ID = urn:marlin:kid:67895432987623454756654729382341
Content Key = 43210987123478904321098712340987
Content URL = https://www.expressplay.com/ep/video/ExpressPlayerDASH-BBB/stream.mpd

https://ms3-gen.test.expressplay.com/hms/ms3/token?customerAuthenticator=YOUR_CUSTOMER_AUTHENTICATOR&contentId=urn:marlin:kid:67895432987623454756654729382341&contentKey=43210987123478904321098712340987&contentURL=https://www.expressplay.com/ep/video/ExpressPlayerDASH-BBB/stream.mpd


Note: In the case of HLS content, you should use the ‘hls://’ 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.

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

Generating Marlin Broadband (BB) Tokens with the REST API


In addition to a Customer Authenticator the Marlin BB tokens API requires the Content ID, Content Key and the token type. The parameters should be formatted into a RESTful POST or GET request similar to the one demonstrated below.

Content ID = bigbuckbunnyhls
Content Key = 12345678123456781234567812345678
tokenType = BuyToOwn
actionTokenType = 1
https://bb-gen.test.expressplay.com/hms/bb/token?customerAuthenticator=YOUR_CUSTOMER_AUTHENTICATOR&contentId=urn:marlin:kid:67895432987623454756654729382341&contentKey=43210987123478904321098712340987&rightsType=BuyToOwn&actionTokenType=1


The token returned will be an XML document similar to the one below.

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ActionToken xmlns="urn:marlin:broadband:1-2:nemo:services:action-token" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ConfigurationInfo broadbandServiceId="urn:marlin:organization:seacert:eval-marlin-service:500" configVersion="3">
<ResourceLocation>http://bb.test.expressplay.com:80/mbs/ConfigurationToken.xml</ResourceLocation>
</ConfigurationInfo>
<LicenseAcquisition>
<Type>personality</Type>
<BusinessToken>
AAwABAAAAxkAAlRXaYEAEBhzH0wTHhRn5EBGS0pbqEoAoCBjaAazeycCRIT8q4kcAFCpT74HxWQy
DUwa4O3yk21TffMdAEjN+pz72o7iv2n97LMXZVcJp3Fn3+LLS3HAj/X24Agp/DgR6WPcb0hGU+Sj
XxvRg+3UMJJT85AyqbpwrYkezElT5ZMp4tRWQ3GB5rkq99XrZsXhyRT4ebP9inCoAOOTJPDPxd14
OqCDBtwq7x6gJTi0fIzGJrJt2qEFhVsAAAAUP4W7RLhF/N38mysAlL970qcrVzM=
</BusinessToken>
</LicenseAcquisition>
</ActionToken>