Support

Token Delivery API v1.2

   

Live Channel

Playing a live audio or video channel on an alternate flash or HTML5 player requires a call to our service through an HTTP request, which will deliver a token.

 

HTTP Request

The stream_type defines the desired stream protocole. It must have one of these 3 values : z, i or e. Put z for flash players, i for HTML5 players and e if you need to use rtmp protocole

Make note of the broadcaster ID (bid) and channel ID (cid) for the desired channel. To find your IDs, simply go to your “publish settings” for your live channel and look at the iframe code:

Input the integers and string into the following:

GET http(s)://services.viewer.dacast.com/token/{stream_type}/b/{bid}/c/{cid}.json

Parameters Recap

Parameter NameValueDescription
Required parameters
bid integer The broadcaster ID to get the token for.
cid integer The ID of the live channel to get token for.
stream_type string The stream type (z, i or e).

Response

If successful, this method returns a channel token in the response body otherwise an http error code and an error message are returned.


Successful Response Example: Live Channel

 


            ?hdnea=st=1376052402~exp=1376052522~acl=/z/secure/177/177*~id=69251~hmac=e4011d9ca20a4cb08c9408307cb6e6f5357a5d07de5428a0899d38ee654799a8&hdcore=2.11.3
            

Video On Demand (VOD) Files

Playing a Flash or HTML5 DaCast video on demand (VOD) channel on an alternate player requires a call to our service through an HTTP request, which will deliver a token. This is a simple string of code that can be entered into HTML.

 

HTTP Request

The stream_type defines the desired stream protocole. It must have one of these 3 values : z, i or e. Put z for flash players, i for HTML5 players and e if you need to use rtmp protocole

Make note of the broadcaster ID (bid) and file ID (fid) for the desired channel. To find your IDs, simply go to your “publish settings” for your on demand file and look at the iframe code:

Input the integers and string into the following:

GET http(s)://services.viewer.dacast.com/token/{stream_type}/b/{bid}/f/{fid}.json

Parameters Recap

Parameter NameValueDescription
Required parameters
bid integer The broadcaster ID to get the token for.
fid integer The ID of the VOD file to get the token for.
stream_type string The stream type (z, i or e).

Response

If successful, this method returns a VOD token in the response body otherwise an http error code and an error message are returned.

 

Successful Response Example: Video On Demand

 


            ?hdnea=st=1376052895~exp=1376053015~acl=/z/dclive_*~hmac=3499460cee201c7cc765ae89fff9f6fb5f1e5a06c8b04324c0cc4b37be768dab&hdcore=2.11.3
            

Comments