To allow/restrict video viewing for a specific user on your site, you need the following:

  1. When integrating the player on the site, you need to pass the user ID (user_id) in your system to the player (GET parameter drmauthtoken)
    <iframe
    src="<https://kinescope.io/embed/123456789?drmauthtoken=${user_id}>"
    width="640"
    height="360"
    frameborder="0"
    allow="autoplay; fullscreen; picture-in-picture; encrypted-media;"
    ></iframe>
  1. Add URL to your backend via API

(https://documenter.getpostman.com/view/10589901/TVCcXpNM#2d2391cc-8b4d-4173-9468-50ff6154fc31)

How does it work

When a user opens a page with a player on your site, that user's ID is passed to the player. Next, the player requests a video decryption key from the license server (where the player also sends the user ID). The license server, having received the user ID, makes a request to your backend using the URL (which you added to us via the API). And if this url responded with http code 200, then the user is given the video decryption key and he watches the video, otherwise it is not given accordingly.