Secure Token and its Implementation

Secure Token is one of the enhanced security feature addon provided by StreamFast. Secure Token allows you to generate secured playback links with an expiration time. Once a token has expired, it is not possible anymore to access the content with it. This will make your content secure to a great extend and prevent playback URL theft.

Secure Token works with a secure code which is generated randomly and end user IP address, only incorporating both of these parameters the stream could be played.

In order to implement the Secure Token :

  • Go to Live Streams > Push
  • Click on the Manage button available right next to your desired Stream Name
  • In the redirected page Select Secure Token.
  • To enable this feature toggle the slider to Enable mode
  • Click Generate and the Secure Token will be created. The corresponding Tokenized Playback URLs will be generated according to the secured token created earlier.
  • The Token can be set with an expiration by adding Token Expiration (in secs)
  • If you want to exclude a particular IP from these restrictions, add those in Allowed IPs
  • Click on Save

The above steps will create a PHP script which Generates your tokens for the URLs and related Player Codes under the Playback URLs / Embed Code session.

Please note that the direct HLS URL with the token will only be played back for the interval you have set in the token expiry. You can now host the PHP Script along the available player code under a.php file and embed on your website.

Related articles