To secure the link to your media we have developed a token system. You can calculate a hash using a secret token you can find in de API menu in the Jet-Stream platform interface.
By keeping your secure token private you will be the only one that can hand out player or media URL's to your viewers, preventing deeplinking and other unauthorized use.
You can copy the examples right into your own codebase. Please make sure you don't expose the secure token in public. Like when checking your sourcecode in to Git.
This code example runs local in the browser. It is safe to use this to double check your implementation using your own secret token.
The provided example is in React because we use Docusaurus as our documentation tool.
SyntaxError: Unexpected token (1:8) 1 : return () ^
You can actually use the above code sample to check the tokens you have generated yourself.
The input fields in the example are actually working, so if you enter your own parameters it will update the result section.
The token you generate will be valid for 5 minutes. If you need a longer validity, lets say, 10 minutes, you can generate the timestamp with an additional 600 seconds. Our platform will validate the token since it is not more than 5 minutes (300 seconds) in the past.