Embed Token Authentication
What is the Embed View Token Authentication?
The Embed View Token Authentication allows you to secure your iframe to prevent unauthorized embedding of your videos.
Signing Procedure
To create a secure URL, you must add a token and expires query parameters to the URL that you want to access. The expires parameter is the UNIX timestamp marking until when the URL is accessible. After this passes, the URL will no longer be accessible.
The token parameter is a HEX value of the SHA256 hash based on the key, video ID and expiration time. To generate the token, you can use the following algorithm.
When accessing a signed embed URL, it will require a valid Referer header, otherwise requests will be rejected.
SHA256_HEX(token_security_key + video_id + expiration)
SHA256("4742a81b-bf15-42fe-8b1c-8fcb9024c550" + "32d140e2-e4f4-4eec-9d53-20371e9be607" + 1623440202)
An example secure URL will then look like:
https://iframe.mediadelivery.net/embed/759/eb1c4f77-0cda-46be-b47d-1118ad7c2ffe?token=5a5de480db5d14ed30717a3e849c7148a998fa42b0c267774756558e2de99eee&expires=1456761770
Updated about 1 year ago